Javadoc and @since in com.sun.source.tree
Werner Dietl
wdietl at gmail.com
Fri Aug 2 14:10:45 PDT 2013
Jon,
I've added two @since annotations and javadoc:
http://hg.openjdk.java.net/type-annotations/type-annotations/langtools/rev/342d34b65fd8
Please have a look. I added some comments about the new TYPE_USE and
TYPE_PARAMETER target. Maybe that should we added just once, somewhere
else? Feel free to edit/remove this.
Only few changes were required, as most methods return a generic Tree
and can automatically return annotated type trees.
I have one question: method
com.sun.source.tree.NewClassTree.getIdentifier()
actually returns the type of the instantiation - including type
annotations, type arguments, etc.
In contrast, method
com.sun.source.tree.NewArrayTree.getType()
presumably does the same thing, i.e. returns the array component type.
Why is one named getIdentifier() and one getType()?
Should getIdentifier() not return type annotations?
Some javadoc on these methods would help :-)
cu, WMD.
On Mon, Jul 29, 2013 at 5:55 PM, Jonathan Gibbons
<jonathan.gibbons at oracle.com> wrote:
> On 07/29/2013 05:44 PM, Werner Dietl wrote:
>>
>> JSR 308 added a few methods/enum constants in com.sun.source.tree, e.g.:
>>
>> com.sun.source.tree.Tree.Kind.ANNOTATED_TYPE
>> com.sun.source.tree.TypeParameterTree.getAnnotations()
>>
>> These currently have no Javadoc (which is consistent with the lack of
>> Javadoc in other such classes) and no @since 1.8.
>> As these classes are @jdk.Supported, I think it would be nice to
>> document our changes.
>> Should I add some first blurbs or is somebody else better suited?
>>
>> Cheers,
>> cu, WMD.
>>
>
> If you put @since on the new items, I'll put @since on the older items.
>
> -- Jon
--
http://www.google.com/profiles/wdietl
More information about the type-annotations-dev
mailing list