[Checkers] InternalUtils.constructor
Mahmood Ali
mahmood at MIT.EDU
Wed Sep 10 17:25:03 EDT 2008
Hi Artemus,
> I am unsure why this method does not return the generated
> constructor for anonymous classes (and instead returns the
> constructor of the superclass).
This is done because the generated method does not contain any of the
type annotations. We are considering having the compiler generate
constructors that contain annotations, but simply haven't gone around
to do so. There is some technical complexity that we would need to
expose if type writers work with anonymous constructors.
> For my work this is causing problems since I'm annotating the new
> part to refer to the annotations on the super type of the anonymous
> class rather than the annotations on the result of invoking the
> constructor, which do affect the result of new.
I do not understand your situation much. I do not quite see your case
for changing this. However, to change this behavior, there is one
conditional in InternalUtils.constructor (with condition
'tree.getClassBody()') that you can eliminate.
Regards,
Mahmood
More information about the checkers
mailing list