Package com.sun.xml.bind.v2.model.impl
Class BuiltinLeafInfoImpl<TypeT,ClassDeclT>
- java.lang.Object
-
- com.sun.xml.bind.v2.model.impl.BuiltinLeafInfoImpl<TypeT,ClassDeclT>
-
- All Implemented Interfaces:
Locatable
,BuiltinLeafInfo<TypeT,ClassDeclT>
,LeafInfo<TypeT,ClassDeclT>
,MaybeElement<TypeT,ClassDeclT>
,NonElement<TypeT,ClassDeclT>
,TypeInfo<TypeT,ClassDeclT>
,Location
- Direct Known Subclasses:
RuntimeBuiltinLeafInfoImpl
public class BuiltinLeafInfoImpl<TypeT,ClassDeclT> extends java.lang.Object implements BuiltinLeafInfo<TypeT,ClassDeclT>
JAXB spec designates a few Java classes to be mapped to XML types in a way that ignores restrictions placed on user-defined beans.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from interface com.sun.xml.bind.v2.model.core.NonElement
ANYTYPE_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BuiltinLeafInfoImpl(TypeT type, javax.xml.namespace.QName... typeNames)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Element<TypeT,ClassDeclT>
asElement()
Deprecated.always return null at this level.boolean
canBeReferencedByIDREF()
Deprecated.why are you calling a method whose return value is always known?static <TypeT,ClassDeclT>
java.util.Map<TypeT,BuiltinLeafInfoImpl<TypeT,ClassDeclT>>createLeaves(Navigator<TypeT,ClassDeclT,?,?> nav)
Creates all theBuiltinLeafInfoImpl
s as specified in the spec.javax.xml.namespace.QName
getElementName()
Deprecated.always return null at this level.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 primary XML type ANYTYPE_NAME of the class.javax.xml.namespace.QName[]
getTypeNames()
Returns all the type names recognized by this bean info.Locatable
getUpstream()
Gets the upstreamLocation
information.boolean
isElement()
Deprecated.always return false at this level.boolean
isSimpleType()
Returns true if thisNonElement
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.BuiltinLeafInfo
getTypeName
-
Methods inherited from interface com.sun.xml.bind.v2.model.annotation.Locatable
getLocation, getUpstream
-
Methods inherited from interface com.sun.xml.bind.v2.model.core.NonElement
isSimpleType
-
Methods inherited from interface com.sun.xml.bind.v2.model.core.TypeInfo
canBeReferencedByIDREF, getType
-
-
-
-
Constructor Detail
-
BuiltinLeafInfoImpl
protected BuiltinLeafInfoImpl(TypeT type, javax.xml.namespace.QName... typeNames)
-
-
Method Detail
-
getTypeNames
public final javax.xml.namespace.QName[] getTypeNames()
Returns all the type names recognized by this bean info.- Returns:
- do not modify the returned array.
-
isElement
public final boolean isElement()
Deprecated.always return false at this level.Description copied from interface:MaybeElement
If the class is bound to an element, return true.Note that when this is true, the class is bound to both an element and a type.
- Specified by:
isElement
in interfaceMaybeElement<TypeT,ClassDeclT>
-
getElementName
public final javax.xml.namespace.QName getElementName()
Deprecated.always return null at this level.Description copied from interface:MaybeElement
Gets the element name of the class, if the class is bound to an element.- Specified by:
getElementName
in interfaceMaybeElement<TypeT,ClassDeclT>
- Returns:
- non-null iff
MaybeElement.isElement()
.
-
asElement
public final Element<TypeT,ClassDeclT> asElement()
Deprecated.always return null at this level.Description copied from interface:MaybeElement
- Specified by:
asElement
in interfaceMaybeElement<TypeT,ClassDeclT>
- Returns:
- null if
MaybeElement.isElement()
==false, non-null ifMaybeElement.isElement()
==true.
-
createLeaves
public static <TypeT,ClassDeclT> java.util.Map<TypeT,BuiltinLeafInfoImpl<TypeT,ClassDeclT>> createLeaves(Navigator<TypeT,ClassDeclT,?,?> nav)
Creates all theBuiltinLeafInfoImpl
s as specified in the spec.LeafInfo
s are all defined by the spec.
-
getType
public TypeT getType()
A reference to the representation of the type.
-
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 interfaceTypeInfo<TypeT,ClassDeclT>
-
getTypeName
public javax.xml.namespace.QName getTypeName()
Description copied from interface:NonElement
Gets the primary XML type ANYTYPE_NAME of the class.A Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.
- Specified by:
getTypeName
in interfaceNonElement<TypeT,ClassDeclT>
- Returns:
- null if the object doesn't have an explicit type ANYTYPE_NAME (AKA anonymous.)
-
getUpstream
public Locatable getUpstream()
Description copied from interface:Locatable
Gets the upstreamLocation
information.- Specified by:
getUpstream
in interfaceLocatable
- 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 interfaceLocatable
-
isSimpleType
public boolean isSimpleType()
Description copied from interface:NonElement
Returns true if thisNonElement
maps to text in XML, without any attribute nor child elements.- Specified by:
isSimpleType
in interfaceNonElement<TypeT,ClassDeclT>
-
-