-
tgutzmann committed revision 718 to the RECODER SVN repository, changing 1 files.
2009-11-09 08:16:20 UTC in RECODER
-
Hej,
do (1) you mean the type at runtime? Or (2) simply the type of a (Field|Method)Reference if it does not have a prefix?
(1) not at all with Recoder, as it is a framework for *static* analysis and metaprogramming ;)
(2) sc.getSourceInfo().getMethod(x).getContainingClassType().
Note, before Java 5 a member reference that is not prefixed would have to come from the current type...
2009-11-09 08:07:44 UTC in RECODER
-
Hej,
it's a bug in javac. See
[the FAQ][1] and [the original bug report][2]
for information. Workaround: Use the eclipse-compiler. The JDK 7 compiler is said to have the bug fixed as well, but I haven't tried it.
Best regards,
Tobias
[1]: http://sourceforge.net/apps/mediawiki/recoder/index.php?title=FAQ#Problems_using_javac
[2]...
2009-11-08 18:53:29 UTC in RECODER
-
Hej,
use TypeDeclaration.getMembers(), iterate over it (watch out, the return value may be "null" if there are no members whatsoever), and on each element try "m instanceof FieldDeclaration".
Alternative, use getFields() and then FieldSpecification.getParent(). Tthis will return a FieldDeclaration. In the current release, you will have to cast it to FieldDeclaration, in the current SVN...
2009-11-06 07:26:02 UTC in RECODER
-
tgutzmann committed revision 717 to the RECODER SVN repository, changing 1 files.
2009-11-06 07:22:57 UTC in RECODER
-
Hi!
As a workaround, you should retrieve the latest version from the SVN repository. I just commited a bugfix for your issue ;)
/Tobias.
2009-11-06 07:19:19 UTC in RECODER
-
tgutzmann committed revision 716 to the RECODER SVN repository, changing 1 files.
2009-11-06 07:12:47 UTC in RECODER
-
Hi!
glad I can help :)
1) is always "null", as a type parameter cannot declare further type parameters. Only MethodDeclarations and "regular" TypeDeclarations declare new type parameters.
2) yes. Your description is correct. List<T> is a TypeArgument, so is <T>.
3) yes. getTypeReferenceCount() returns the number of bounds **declared explicitly in source code** Examples:
2009-11-05 15:31:37 UTC in RECODER
-
Hej!
TypeArgument**Declaration** may be a not so good naming, but what's done is done ;-) Anyway, it is a type argument that occurs in source code. Example: In
List<? extends Number>
the "? extends Number" is a TypeArgumentDeclaration.
A Type**Parameter**Declaration is always part of another declaration, namely either of a MethodDeclaration or a...
2009-11-02 10:24:01 UTC in RECODER
-
Hej,
a TypeArgument is an abstraction (in recoder.abstraction) .
There are currently four subtypes of TypeArgument:
- in .class files: recoder.bytecode.TypeArgumentInfo
- in source code: recoder.java.declaration.TypeArgumentDeclaration
- for internal use 1: recoder.service.DefaultProgramModelInfo.ResolvedTypeArgument is, e.g., used when the return type of a generic method has...
2009-10-28 10:17:16 UTC in RECODER