How is it defined?

is it something like:

private Foo<Bar> value;

or like:

private FooBar value;

where FooBar is "public class FooBar extends Foo<Bar> {..."

If it is the first, the problem is type erasure in Java generics. From
the "declaration" of the field, you cannot read the type. If you use
the second, it should work because the generic typeis "captured /
fixed" in the FooBar class definition.

If the second does not work, tell me and I will send you a working
example.

cheers,
Berto

On Jun 14, 10:27 pm, pansen <[email protected]> wrote:
> hi,
>
> assuming i'm in a generator and receive a ``JClassType source`` which
> is in that case a ``org.test.Foo<Bar>``.
>
> then ``souce.isGenericType()`` returns ``null``
> but ``source.getParameterizedQualifiedSourceName()`` returns
> "org.test.Foo<Bar>".
> whereas ``source.getSimpleSourceName()`` only returns "Foo"
>
> ...which is a problem for me.
>
> what can i call to see this is a specialization of a generic? e.g.
> something like ``source.base().isGenericType()``.
>
> what can i call to see the specialization of this class - in this case
> i want the result of "Bar".
>
> thx a lot, andi

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to