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

java.lang.Object
  extended by com.sun.xml.bind.v2.model.impl.TypeInfoImpl<T,C,F,M>
      extended by com.sun.xml.bind.v2.model.impl.ElementInfoImpl<T,C,F,M>
All Implemented Interfaces:
Locatable, Element<T,C>, ElementInfo<T,C>, TypeInfo<T,C>
Direct Known Subclasses:
RuntimeElementInfoImpl

 class ElementInfoImpl<T,C,F,M>
extends TypeInfoImpl<T,C,F,M>
implements ElementInfo<T,C>

ElementInfo implementation.


Nested Class Summary
protected  class ElementInfoImpl.PropertyImpl
          Singleton instance of ElementPropertyInfo for this element.
 
Field Summary
 
Fields inherited from class com.sun.xml.bind.v2.model.impl.TypeInfoImpl
builder, owner
 
Constructor Summary
ElementInfoImpl(ModelBuilder<T,C,F,M> builder, RegistryInfoImpl<T,C,F,M> registry, M m)
           
 
Method Summary
 boolean canBeReferencedByIDREF()
          Deprecated. why are you calling a method whose return value is always known?
protected  ElementInfoImpl.PropertyImpl createPropertyImpl()
           
 T getContentInMemoryType()
          T of JAXBElement<T>.
 NonElement<T,C> getContentType()
          Short for getProperty().ref().get(0).
 QName getElementName()
          Gets the element name of the class.
 Location getLocation()
          Gets the location object that this object points to.
 ElementPropertyInfo<T,C> getProperty()
          Gets the object that represents the value property.
 ClassInfo<T,C> getScope()
          If non-null, this element is only active inside the given scope.
 ElementInfo<T,C> getSubstitutionHead()
          If this element can substitute another element, return that element.
 Collection<? extends ElementInfoImpl<T,C,F,M>> getSubstitutionMembers()
          All the ElementInfos whose ElementInfo.getSubstitutionHead() points to this object.
 T getType()
          Returns the representation for JAXBElement<contentInMemoryType>.
(package private)  void link()
          Called after all the TypeInfos are collected into the TypeInfoImpl.owner.
(package private)  QName parseElementName(XmlElementDecl e)
           
 
Methods inherited from class com.sun.xml.bind.v2.model.impl.TypeInfoImpl
getUpstream, nav, parseElementName, parseTypeName, parseTypeName, 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.annotation.Locatable
getUpstream
 

Constructor Detail

ElementInfoImpl

public ElementInfoImpl(ModelBuilder<T,C,F,M> builder,
                       RegistryInfoImpl<T,C,F,M> registry,
                       M m)
                throws IllegalAnnotationException
Parameters:
m - The factory method on ObjectFactory that comes with XmlElementDecl.
Throws:
IllegalAnnotationException
Method Detail

parseElementName

final QName parseElementName(XmlElementDecl e)

createPropertyImpl

protected ElementInfoImpl.PropertyImpl createPropertyImpl()

getProperty

public ElementPropertyInfo<T,C> getProperty()
Description copied from interface: ElementInfo
Gets the object that represents the value property.

Specified by:
getProperty in interface ElementInfo<T,C>
Returns:
non-null.

getContentType

public NonElement<T,C> getContentType()
Description copied from interface: ElementInfo
Short for getProperty().ref().get(0). The type of the value this element holds. Normally, this is the T of JAXBElement<T>. But if the property is adapted, this is the on-the-wire type. Or if the element has a list of values, then this field represents the type of the individual item.

Specified by:
getContentType in interface ElementInfo<T,C>
See Also:
ElementInfo.getContentInMemoryType()

getContentInMemoryType

public T getContentInMemoryType()
Description copied from interface: ElementInfo
T of JAXBElement<T>.

This is tied to the in-memory representation.

Specified by:
getContentInMemoryType in interface ElementInfo<T,C>
See Also:
ElementInfo.getContentType()

getElementName

public QName getElementName()
Description copied from interface: Element
Gets the element name of the class.

Specified by:
getElementName in interface Element<T,C>
Returns:
Always non-null.

getType

public T getType()
Description copied from interface: ElementInfo
Returns the representation for JAXBElement<contentInMemoryType>.

This returns the signature in Java and thus isn't affected by the adapter.

Specified by:
getType in interface ElementInfo<T,C>
Specified by:
getType in interface TypeInfo<T,C>
Returns:
always non-null.

canBeReferencedByIDREF

public final boolean canBeReferencedByIDREF()
Deprecated. why are you calling a method whose return value is always known?

Leaf-type cannot be referenced from IDREF.

Specified by:
canBeReferencedByIDREF in interface TypeInfo<T,C>

getScope

public ClassInfo<T,C> getScope()
Description copied from interface: Element
If non-null, this element is only active inside the given scope.

Specified by:
getScope in interface Element<T,C>

getSubstitutionHead

public ElementInfo<T,C> getSubstitutionHead()
Description copied from interface: Element
If this element can substitute another element, return that element.

Substitutability of elements are transitive.

Specified by:
getSubstitutionHead in interface Element<T,C>
Specified by:
getSubstitutionHead in interface ElementInfo<T,C>
Returns:
null if no such element exists.

getSubstitutionMembers

public Collection<? extends ElementInfoImpl<T,C,F,M>> getSubstitutionMembers()
Description copied from interface: ElementInfo
All the ElementInfos whose ElementInfo.getSubstitutionHead() points to this object.

Specified by:
getSubstitutionMembers in interface ElementInfo<T,C>
Returns:
can be empty but never null.

link

void link()
Called after all the TypeInfos are collected into the TypeInfoImpl.owner.

Overrides:
link in class TypeInfoImpl<T,C,F,M>

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