[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-type-annotations-dev
Subject:    Re: getAnnotationsByType
From:       Jonathan Gibbons <jonathan.gibbons () oracle ! com>
Date:       2013-02-21 1:12:00
Message-ID: 51257460.1010304 () oracle ! com
[Download RAW message or body]

We cannot make the methods be default methods in the short term because 
of the JDK bootstrap requirements.

-- Jon

On 02/20/2013 04:24 PM, Joe Darcy wrote:
> Hi Jon,
> 
> On 2/20/2013 2:30 PM, Jonathan Gibbons wrote:
> > Joe,
> > 
> > With the proposed new javax.lang.model API for type annotationns, I 
> > get compilation errors in jaxws.
> > 
> > Is this to be expected, and do we have a plan to address this?
> 
> I suppose this is to be expected since we are in effect adding several 
> annotation-reading methods to the TypeMirror interface that this 
> nominal implementation in jaxws doesn't have.
> 
> As a stop-gap measure to get the build going, we can make the methods 
> in AnnotatedConstruct be default methods, but once we know what API we 
> want, we should have the jax-ws team implement those methods in this 
> marker object and then revert the default methods to normal one. (As a 
> matter of policy, we cannot use default methods in javax.lang.model 
> since the API has to be runnable on Java SE 7/JDK 7. [1])
> 
> As an aside, should the need arise I'll note that by using annotation 
> processors it is possible to generate a compile-time 
> JDK-version-specific source for an implementation of an interface.
> 
> Cheers,
> 
> -Joe
> 
> [1] http://hg.openjdk.java.net/jdk8/tl/langtools/rev/09f65aad4759
> 
> 
> > 
> > -- Jon
> > 
> > /w/jjg/work/type-annos/type-annotations/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java:365: \
> >                 
> > error: <anonymous com.sun.tools.internal.jxc.model.nav.ApNavigator$1> 
> > is not abstract and does not override abstract method 
> > <A>getAnnotationsByType(Class<A>) in AnnotatedConstruct
> > private static final TypeMirror DUMMY = new TypeMirror() {
> > 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic