Class LocatableAnnotation

  • All Implemented Interfaces:
    Locatable, Location, java.lang.reflect.InvocationHandler

    public class LocatableAnnotation
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler, Locatable, Location
    Annotation that also implements Locatable.
    Author:
    Kohsuke Kawaguchi
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <A extends java.lang.annotation.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.
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)  
      java.lang.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
    • Method Detail

      • create

        public static <A extends java.lang.annotation.Annotation> A create​(A annotation,
                                                                           Locatable parentSourcePos)
        Wraps the annotation into a proxy so that the returned object will also implement Locatable.
      • 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 java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable
      • toString

        public java.lang.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 java.lang.Object
        Returns:
        never null.