Class LocatableAnnotation
- java.lang.Object
-
- com.sun.xml.bind.v2.model.annotation.LocatableAnnotation
-
- All Implemented Interfaces:
Locatable,Location,InvocationHandler
public class LocatableAnnotation extends Object implements InvocationHandler, Locatable, Location
Annotationthat also implementsLocatable.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A extends Annotation>
Acreate(A annotation, Locatable parentSourcePos)Wraps the annotation into a proxy so that the returned object will also implementLocatable.LocationgetLocation()Gets the location object that this object points to.LocatablegetUpstream()Gets the upstreamLocationinformation.Objectinvoke(Object proxy, Method method, Object[] args)StringtoString()Returns a human-readable string that represents this position.
-
-
-
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 implementLocatable.
-
getUpstream
public Locatable getUpstream()
Description copied from interface:LocatableGets the upstreamLocationinformation.- Specified by:
getUpstreamin interfaceLocatable- Returns:
- can be null.
-
getLocation
public Location getLocation()
Description copied from interface:LocatableGets the location object that this object points to. This operation could be inefficient and costly.- Specified by:
getLocationin interfaceLocatable
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
-