java.lang.Object
org.glassfish.jaxb.runtime.v2.model.annotation.Quick
All Implemented Interfaces:
Annotation, Locatable, Location

public abstract class Quick extends Object implements Annotation, Locatable, Location
Base implementation of Locatable Annotation.

Derived classes of this class is provided for annotations that are commonly used in JAXB, to improve the performance of LocatableAnnotation.create(A, org.glassfish.jaxb.core.v2.model.annotation.Locatable).

Author:
Kohsuke Kawaguchi
  • Constructor Details

    • Quick

      protected Quick(Locatable upstream)
  • Method Details

    • getAnnotation

      protected abstract Annotation getAnnotation()
      Gets the annotation object that this object is wrapping.
    • newInstance

      protected abstract Quick newInstance(Locatable upstream, Annotation core)
      Factory method to create a new instance of the same kind. A Quick object also works as a factory of itself
    • getLocation

      public final 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
    • getUpstream

      public final Locatable getUpstream()
      Description copied from interface: Locatable
      Gets the upstream Location information.
      Specified by:
      getUpstream in interface Locatable
      Returns:
      can be null.
    • toString

      public final String toString()
      Description copied from interface: Location
      Returns a human-readable string that represents this position.
      Specified by:
      toString in interface Annotation
      Specified by:
      toString in interface Location
      Overrides:
      toString in class Object
      Returns:
      never null.