com.sun.xml.bind.v2.model.annotation
Class LocatableAnnotation

java.lang.Object
  extended by com.sun.xml.bind.v2.model.annotation.LocatableAnnotation
All Implemented Interfaces:
Locatable, Location, InvocationHandler

public class LocatableAnnotation
extends Object
implements InvocationHandler, Locatable, Location

Annotation that also implements Locatable.


Constructor Summary
LocatableAnnotation(Annotation core, Locatable upstream)
           
 
Method Summary
static
<A extends Annotation>
A
create(A annotation, Locatable parentSourcePos)
          Wraps the annotation into a proxy so that the returned object will also implement Locatable.
 Location getLocation()
          Gets the location object that this object points to.
 Locatable getUpstream()
          Gets the upstream Location information.
 Object invoke(Object proxy, Method method, Object[] args)
           
 String toString()
          Returns a human-readable string that represents this position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocatableAnnotation

LocatableAnnotation(Annotation core,
                    Locatable upstream)
Method Detail

create

public static <A extends Annotation> A create(A annotation,
                                              Locatable parentSourcePos)
Wraps the annotation into a proxy so that the returned object will also implement Locatable.


getUpstream

public Locatable getUpstream()
Description copied from interface: Locatable
Gets the upstream Location information.

Specified by:
getUpstream in interface Locatable
Returns:
can be null.

getLocation

public Location getLocation()
Description copied from interface: Locatable
Gets the location object that this object points to. This operation could be inefficient and costly.

Specified by:
getLocation in interface Locatable

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

toString

public String toString()
Description copied from interface: Location
Returns a human-readable string that represents this position.

Specified by:
toString in interface Location
Overrides:
toString in class Object
Returns:
never null.