Joel, some comments on AnnotatedType#getAnnotatedOwnerType(): * Is it convention to use <p> tags to describe the complexity of the return value vs. just explaining it all in the @return tag?
* What is the convention for @see nowadays? Is it 1.9 or 9? Cheers, Paul On Mon, Dec 7, 2015 at 2:29 PM, Joel Borggrén-Franck < joel.borggren.fra...@gmail.com> wrote: > Hi, > > Thanks for the comments. I removed the allocations and fixed the > quadratic copy in popAllLocations. > > New webrev: http://cr.openjdk.java.net/~jfranck/8057804/webrev.01/ > > cheers > /Joel > > On Thu, Nov 19, 2015 at 2:07 PM, Claes Redestad > <claes.redes...@oracle.com> wrote: > > Hi Joel, > > > > looks good. I see a CCC has been filed. > > > > Nits: > > In AnnotatedTypeFactory.java, newly introduced > EMPTY_TYPE_ANNOTATION_ARRAY > > could be used to replace a few occurrences of new TypeAnnotation[0] in > the > > code above). > > > > In TypeAnnotation.java: > > New method popLocation(byte tag) seems to be unused, and popLocation() is > > only used from popAllLocations(byte tag), so it might suffice to only > keep > > popAllLocations: > > > > public LocationInfo popAllLocations(byte tag) { > > LocationInfo l = this; > > int depth = l.depth; > > while(depth > 0 && l.locations[depth - 1].tag == tag) { > > depth--; > > } > > if (depth != l.depth) { > > Location[] res = new Location[depth]; > > System.arraycopy(this.locations, 0, res, 0, depth); > > return new LocationInfo(depth, res); > > } > > return l; > > } > > > > Not a reviewer, easy to ignore. :-) > > > > /Claes > > > > > > On 2015-11-17 20:15, Joel Borggrén-Franck wrote: > >> > >> Hi, > >> > >> When reflecting over annotated types, there is currently no way to get > >> the potentially annotated owner of a type. For example, given you have > >> an instance of '@A Outer . @B Inner' you can't traverse it to get '@A > >> Outer' . > >> > >> This API addition fixes this. Because both parameterized and > >> non-generic types can have an owner, this addition goes into the base > >> AnnotatedType interface together with a default implementation. CCC > >> has been filed. > >> > >> The parsing code and annotated type factory had to be fixed to deal > >> with navigating inside nested types. > >> > >> Bug: https://bugs.openjdk.java.net/browse/JDK-8057804 > >> Webrev: http://cr.openjdk.java.net/~rbackman/jbf/8057804/webrev.00/ > >> > >> > >> (OCA is signed and processed). > >> > >> Cheers > >> /Joel > > > > >