com.sun.xml.bind.v2.model.impl
Class RuntimeClassInfoImpl.RuntimePropertySeed

java.lang.Object
  extended by com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.RuntimePropertySeed
All Implemented Interfaces:
AnnotationSource, Locatable, PropertySeed<Type,Class,Field,Method>
Enclosing class:
RuntimeClassInfoImpl

static final class RuntimeClassInfoImpl.RuntimePropertySeed
extends Object
implements PropertySeed<Type,Class,Field,Method>


Constructor Summary
RuntimeClassInfoImpl.RuntimePropertySeed(PropertySeed<Type,Class,Field,Method> core, Accessor acc)
           
 
Method Summary
 Accessor getAccessor()
           
 Location getLocation()
          Gets the location object that this object points to.
 String getName()
          The name of the property is a spec defined concept --- although it doesn't do so explicitly in anywhere.
 Type getRawType()
          Gets the actual data type of the field.
 Locatable getUpstream()
          Gets the upstream Location information.
 boolean hasAnnotation(Class<? extends Annotation> annotationType)
          Returns true if the property has the specified annotation.
<A extends Annotation>
A
readAnnotation(Class<A> annotationType)
          Gets the value of the specified annotation from the given property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeClassInfoImpl.RuntimePropertySeed

public RuntimeClassInfoImpl.RuntimePropertySeed(PropertySeed<Type,Class,Field,Method> core,
                                                Accessor acc)
Method Detail

getName

public String getName()
Description copied from interface: PropertySeed
The name of the property is a spec defined concept --- although it doesn't do so explicitly in anywhere.

Specified by:
getName in interface PropertySeed<Type,Class,Field,Method>
See Also:
PropertyInfo.getName()

readAnnotation

public <A extends Annotation> A readAnnotation(Class<A> annotationType)
Description copied from interface: AnnotationSource
Gets the value of the specified annotation from the given property.

When this method is used for a property that consists of a getter and setter, it returns the annotation on either of those methods. If both methods have the same annotation, it is an error.

Specified by:
readAnnotation in interface AnnotationSource
Returns:
null if the annotation is not present.

hasAnnotation

public boolean hasAnnotation(Class<? extends Annotation> annotationType)
Description copied from interface: AnnotationSource
Returns true if the property has the specified annotation.

Short for readAnnotation(annotationType)!=null, but this method is typically faster.

Specified by:
hasAnnotation in interface AnnotationSource

getRawType

public Type getRawType()
Description copied from interface: PropertySeed
Gets the actual data type of the field.

The data of the property is stored by using this type.

The difference between the RuntimePropertyInfo.getIndividualType() and this method is clear when the property is a multi-value property. The RuntimePropertyInfo.getIndividualType() method returns the type of the item, but this method returns the actual collection type.

Specified by:
getRawType in interface PropertySeed<Type,Class,Field,Method>

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

getUpstream

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

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

getAccessor

public Accessor getAccessor()