You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Daniel Perry <d....@netcase.co.uk> on 2005/09/01 16:38:12 UTC

xdoclet module with Java 1.5

Hi,

I'm trying to use the OJB xdoclet module (from 1.0.3 download) with java 5
generics.

The following:
  ArrayList <Integer>generic  = new ArrayList<Integer>();

gives an error:
[ojbdoclet] Error parsing File C:\java\pol\src\java\Test.java:Encountered
"<" at
 line 11, column 27.
[ojbdoclet] Was expecting one of:


Is there a 1.5 compatible version?

Also, can I use generics for collections in OJB classes?

Thanks,

Daniel.


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: xdoclet module with Java 1.5

Posted by Thomas Dudziak <to...@gmail.com>.
On 9/1/05, Daniel Perry <d....@netcase.co.uk> wrote:

> I'm trying to use the OJB xdoclet module (from 1.0.3 download) with java 5
> generics.
> 
> The following:
>   ArrayList <Integer>generic  = new ArrayList<Integer>();
> 
> gives an error:
> [ojbdoclet] Error parsing File C:\java\pol\src\java\Test.java:Encountered
> "<" at
>  line 11, column 27.
> [ojbdoclet] Was expecting one of:
> 
> Is there a 1.5 compatible version?

This is an problem of XDoclet itself. Basically you need a new
XJavadoc jar (1.5, which you can get from here:
http://sourceforge.net/projects/xdoclet/).
 
> Also, can I use generics for collections in OJB classes?

Well, yes, sort-of. You still need to define the element-class-ref
(XDoclet does not use the generics information), but since the
generics are lost in the bytecode (compiled to normal classes and
casts), they will work.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org