com.sun.xml.bind.v2.model.annotation
Interface Locatable

All Known Subinterfaces:
ArrayInfo<T,C>, BuiltinLeafInfo<T,C>, CClass, CElement, ClassInfo<T,C>, CNonElement, CTypeInfo, Element<T,C>, ElementInfo<T,C>, EnumLeafInfo<T,C>, LeafInfo<T,C>, MaybeElement<T,C>, NonElement<T,C>, PropertySeed<T,C,F,M>, RuntimeArrayInfo, RuntimeBuiltinLeafInfo, RuntimeClassInfo, RuntimeElement, RuntimeElementInfo, RuntimeEnumLeafInfo, RuntimeLeafInfo, RuntimeNonElement, RuntimeTypeInfo, TypeInfo<T,C>, WildcardTypeInfo<T,C>
All Known Implementing Classes:
AbstractCElement, AbstractCTypeInfoImpl, AnyTypeImpl, ArrayInfoImpl, AttributePropertyInfoImpl, BuiltinLeafInfoImpl, CArrayInfo, CBuiltinLeafInfo, CClassInfo, CClassRef, CElementInfo, CEnumLeafInfo, ClassInfoImpl, ClassLocatable, CWildcardTypeInfo, ElementInfoImpl, ElementPropertyInfoImpl, EnumLeafInfoImpl, ERPropertyInfoImpl, FieldLocatable, FieldPropertySeed, GetterSetterPropertySeed, LeafInfoImpl, LocatableAnnotation, MapPropertyInfoImpl, MethodLocatable, PropertyInfoImpl, Quick, ReferencePropertyInfoImpl, RegistryInfoImpl, RuntimeAnyTypeImpl, RuntimeArrayInfoImpl, RuntimeAttributePropertyInfoImpl, RuntimeBuiltinLeafInfoImpl, RuntimeClassInfoImpl, RuntimeClassInfoImpl.RuntimePropertySeed, RuntimeElementInfoImpl, RuntimeElementPropertyInfoImpl, RuntimeEnumLeafInfoImpl, RuntimeMapPropertyInfoImpl, RuntimeReferencePropertyInfoImpl, RuntimeValuePropertyInfoImpl, SingleTypePropertyInfoImpl, TypeInfoImpl, ValuePropertyInfoImpl

public interface Locatable

Location that is chained.

Locatable forms a tree structure, where each Locatable points back to the upstream Locatable. For example, imagine Locatable X that points to a particular annotation, whose upstream is Locatable Y, which points to a particular method (on which the annotation is put), whose upstream is Locatable Z, which points to a particular class (in which the method is defined), whose upstream is Locatable W, which points to another class (which refers to the class Z), and so on.

This chain will be turned into a list when we report the error to users. This allows them to know where the error happened and why that place became relevant.


Method Summary
 Location getLocation()
          Gets the location object that this object points to.
 Locatable getUpstream()
          Gets the upstream Location information.
 

Method Detail

getUpstream

Locatable getUpstream()
Gets the upstream Location information.

Returns:
can be null.

getLocation

Location getLocation()
Gets the location object that this object points to. This operation could be inefficient and costly.