com.sun.xml.bind.v2.model.impl
Class PropertyInfoImpl<T,C,F,M>

java.lang.Object
  extended by com.sun.xml.bind.v2.model.impl.PropertyInfoImpl<T,C,F,M>
All Implemented Interfaces:
Locatable, PropertyInfo<T,C>, java.lang.Comparable<PropertyInfoImpl>
Direct Known Subclasses:
ERPropertyInfoImpl, MapPropertyInfoImpl, SingleTypePropertyInfoImpl

abstract class PropertyInfoImpl<T,C,F,M>
extends java.lang.Object
implements PropertyInfo<T,C>, Locatable, java.lang.Comparable<PropertyInfoImpl>

Default partial implementation for PropertyInfo.


Field Summary
protected  ClassInfoImpl<T,C,F,M> parent
           
protected  PropertySeed<T,C,F,M> seed
          Object that reads annotations.
 
Constructor Summary
protected PropertyInfoImpl(ClassInfoImpl<T,C,F,M> parent, PropertySeed<T,C,F,M> spi)
           
 
Method Summary
protected  javax.xml.namespace.QName calcXmlName(javax.xml.bind.annotation.XmlElement e)
          Computes the tag name from a XmlElement by taking the defaulting into account.
protected  javax.xml.namespace.QName calcXmlName(javax.xml.bind.annotation.XmlElementWrapper e)
          Computes the tag name from a XmlElementWrapper by taking the defaulting into account.
 int compareTo(PropertyInfoImpl that)
           
 java.lang.String displayName()
          Gets the display name of the property.
 Adapter<T,C> getAdapter()
          This is the default implementation of the getAdapter method defined on many of the PropertyInfo-derived classes.
 javax.activation.MimeType getExpectedMimeType()
          Expected MIME type, if any.
 T getIndividualType()
           
 Location getLocation()
          Gets the location object that this object points to.
 java.lang.String getName()
          Gets the name of the property.
 T getRawType()
           
 javax.xml.namespace.QName getSchemaType()
          The effective value of XmlSchemaType annotation, if any.
 Locatable getUpstream()
          A PropertyInfoImpl is always referenced by its enclosing class, so return that as the upstream.
 ID id()
          Returns the IDness of the value of this element.
 boolean inlineBinaryData()
          If this is true and this property indeed represents a binary data, it should be always inlined.
 boolean isCollection()
          Returns true if this is a multi-valued collection property.
protected  void link()
          Called after all the TypeInfos are collected into the governing TypeInfoSet.
protected  Navigator<T,C,F,M> nav()
           
 ClassInfoImpl<T,C,F,M> parent()
          Gets the ClassInfo or ElementInfo to which this property belongs.
protected  AnnotationReader<T,C,F,M> reader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.xml.bind.v2.model.core.PropertyInfo
kind, ref
 

Field Detail

seed

protected final PropertySeed<T,C,F,M> seed
Object that reads annotations.


parent

protected final ClassInfoImpl<T,C,F,M> parent
Constructor Detail

PropertyInfoImpl

protected PropertyInfoImpl(ClassInfoImpl<T,C,F,M> parent,
                           PropertySeed<T,C,F,M> spi)
Method Detail

parent

public ClassInfoImpl<T,C,F,M> parent()
Description copied from interface: PropertyInfo
Gets the ClassInfo or ElementInfo to which this property belongs.

Specified by:
parent in interface PropertyInfo<T,C>

nav

protected final Navigator<T,C,F,M> nav()

reader

protected final AnnotationReader<T,C,F,M> reader()

getRawType

public T getRawType()

getIndividualType

public T getIndividualType()

getName

public final java.lang.String getName()
Description copied from interface: PropertyInfo
Gets the name of the property.

For example, "foo" or "bar". This doesn't directly affect XML. The property name uniquely identifies a property within a class.

Specified by:
getName in interface PropertyInfo<T,C>
See Also:
XmlType.propOrder()

getAdapter

public Adapter<T,C> getAdapter()
This is the default implementation of the getAdapter method defined on many of the PropertyInfo-derived classes.

Specified by:
getAdapter in interface PropertyInfo<T,C>
Returns:
null if the property is not adapted.

displayName

public final java.lang.String displayName()
Description copied from interface: PropertyInfo
Gets the display name of the property.

This is a convenience method for parent().getName()+'#'+getName().

Specified by:
displayName in interface PropertyInfo<T,C>

id

public final ID id()
Description copied from interface: PropertyInfo
Returns the IDness of the value of this element.

Specified by:
id in interface PropertyInfo<T,C>
Returns:
always non-null
See Also:
XmlID, XmlIDREF

getExpectedMimeType

public final javax.activation.MimeType getExpectedMimeType()
Description copied from interface: PropertyInfo
Expected MIME type, if any.

Specified by:
getExpectedMimeType in interface PropertyInfo<T,C>

inlineBinaryData

public final boolean inlineBinaryData()
Description copied from interface: PropertyInfo
If this is true and this property indeed represents a binary data, it should be always inlined.

Specified by:
inlineBinaryData in interface PropertyInfo<T,C>

getSchemaType

public final javax.xml.namespace.QName getSchemaType()
Description copied from interface: PropertyInfo
The effective value of XmlSchemaType annotation, if any.

Specified by:
getSchemaType in interface PropertyInfo<T,C>
Returns:
maye be null.

isCollection

public final boolean isCollection()
Description copied from interface: PropertyInfo
Returns true if this is a multi-valued collection property. Otherwise false, in which case the property is a single value.

Specified by:
isCollection in interface PropertyInfo<T,C>

link

protected void link()
Called after all the TypeInfos are collected into the governing TypeInfoSet. Derived class can do additional actions to complete the model.


getUpstream

public Locatable getUpstream()
A PropertyInfoImpl is always referenced by its enclosing class, so return that as the upstream.

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

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

calcXmlName

protected final javax.xml.namespace.QName calcXmlName(javax.xml.bind.annotation.XmlElement e)
Computes the tag name from a XmlElement by taking the defaulting into account.


calcXmlName

protected final javax.xml.namespace.QName calcXmlName(javax.xml.bind.annotation.XmlElementWrapper e)
Computes the tag name from a XmlElementWrapper by taking the defaulting into account.


compareTo

public int compareTo(PropertyInfoImpl that)
Specified by:
compareTo in interface java.lang.Comparable<PropertyInfoImpl>