com.sun.xml.bind.v2.model.impl
Class LeafInfoImpl<TypeT,ClassDeclT>

java.lang.Object
  extended by com.sun.xml.bind.v2.model.impl.LeafInfoImpl<TypeT,ClassDeclT>
All Implemented Interfaces:
Locatable, LeafInfo<TypeT,ClassDeclT>, MaybeElement<TypeT,ClassDeclT>, NonElement<TypeT,ClassDeclT>, TypeInfo<TypeT,ClassDeclT>, Location
Direct Known Subclasses:
BuiltinLeafInfoImpl

abstract class LeafInfoImpl<TypeT,ClassDeclT>
extends java.lang.Object
implements LeafInfo<TypeT,ClassDeclT>, Location


Constructor Summary
protected LeafInfoImpl(TypeT type, javax.xml.namespace.QName typeName)
           
 
Method Summary
 boolean canBeReferencedByIDREF()
          Deprecated. why are you calling a method whose return value is always known?
 Location getLocation()
          Gets the location object that this object points to.
 TypeT getType()
          A reference to the representation of the type.
 javax.xml.namespace.QName getTypeName()
          Gets the XML type name of the class.
 Locatable getUpstream()
          Gets the upstream Location information.
 boolean isSimpleType()
          Returns true if this NonElement maps to text in XML, without any attribute nor child elements.
 java.lang.String toString()
          Returns a human-readable string that represents this position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.xml.bind.v2.model.core.MaybeElement
asElement, getElementName, isElement
 

Constructor Detail

LeafInfoImpl

protected LeafInfoImpl(TypeT type,
                       javax.xml.namespace.QName typeName)
Method Detail

getType

public TypeT getType()
A reference to the representation of the type.

Specified by:
getType in interface TypeInfo<TypeT,ClassDeclT>
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<TypeT,ClassDeclT>

getTypeName

public javax.xml.namespace.QName getTypeName()
Description copied from interface: NonElement
Gets the XML type name of the class.

Specified by:
getTypeName in interface NonElement<TypeT,ClassDeclT>
Returns:
null if the object doesn't have an explicit type name (AKA anonymous.)

getUpstream

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

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

isSimpleType

public boolean isSimpleType()
Description copied from interface: NonElement
Returns true if this NonElement maps to text in XML, without any attribute nor child elements.

Specified by:
isSimpleType in interface NonElement<TypeT,ClassDeclT>

toString

public java.lang.String toString()
Description copied from interface: Location
Returns a human-readable string that represents this position.

Specified by:
toString in interface Location
Overrides:
toString in class java.lang.Object
Returns:
never null.