public abstract class CBuiltinLeafInfo extends Object implements CNonElement, BuiltinLeafInfo<NType,NClass>, LeafInfo<NType,NClass>, Location
This represents the spec-defined default handling for the Java
type (getType()
.
For those Java classes (such as String
or Boolean
)
where the spec designates a specific default handling, there are
constants in this class (such as STRING
or BOOLEAN
.)
The generated type-safe enum classes are also a leaf class,
and as such there are CEnumLeafInfo
that represents it
as CBuiltinLeafInfo
.
This class represents the default handling, and therefore
we can only have one instance per one NType
. Handling of
other XML Schema types (such as xs:token) are represented as
a general TypeUse
objects.
Modifier and Type | Field and Description |
---|---|
static CBuiltinLeafInfo |
ANYTYPE |
static CBuiltinLeafInfo |
BASE64_BYTE_ARRAY |
static CBuiltinLeafInfo |
BIG_DECIMAL |
static CBuiltinLeafInfo |
BIG_INTEGER |
static CBuiltinLeafInfo |
BOOLEAN |
static TypeUse |
BOOLEAN_ZERO_OR_ONE
boolean restricted to 0 or 1.
|
static CBuiltinLeafInfo |
BYTE |
static CBuiltinLeafInfo |
CALENDAR |
static CBuiltinLeafInfo |
DATA_HANDLER |
static CBuiltinLeafInfo |
DOUBLE |
static CBuiltinLeafInfo |
DURATION |
static CBuiltinLeafInfo |
FLOAT |
static TypeUse |
HEXBIN_BYTE_ARRAY |
static TypeUse |
ID |
static TypeUse |
IDREF
IDREF.
|
static CBuiltinLeafInfo |
IMAGE |
static CBuiltinLeafInfo |
INT |
static Map<NType,CBuiltinLeafInfo> |
LEAVES
All built-in leaves.
|
static CBuiltinLeafInfo |
LONG |
static TypeUse |
NORMALIZED_STRING |
static CBuiltinLeafInfo |
QNAME |
static CBuiltinLeafInfo |
SHORT |
static CBuiltinLeafInfo |
STRING |
static TypeUse |
STRING_LIST
For all list of strings, such as NMTOKENS, ENTITIES.
|
static TypeUse |
TOKEN |
static CBuiltinLeafInfo |
XML_SOURCE |
ANYTYPE_NAME
Modifier and Type | Method and Description |
---|---|
Element<NType,NClass> |
asElement()
Deprecated.
always return null at this level.
|
boolean |
canBeReferencedByIDREF()
Deprecated.
why are you calling a method whose return value is always known?
|
CAdapter |
getAdapterUse()
Deprecated.
|
QName |
getElementName()
Deprecated.
always return null at this level.
|
MimeType |
getExpectedMimeType()
CBuiltinLeafInfo never has a default associated MIME type. |
CNonElement |
getInfo()
Deprecated.
|
Location |
getLocation()
Gets the location object that this object points to.
|
Locator |
getLocator()
Gets the source location in the schema from which this model component is created.
|
com.sun.xml.xsom.XSComponent |
getSchemaComponent()
If this model object is built from XML Schema,
this property returns a schema component from which the model is built.
|
NType |
getType()
A reference to the representation of the type.
|
QName |
getTypeName()
Gets the primary XML type ANYTYPE_NAME of the class.
|
QName[] |
getTypeNames()
Returns all the type names recognized by this bean info.
|
Locatable |
getUpstream()
Gets the upstream
Location information. |
ID |
idUse()
Whether the referenced type (individual item type in case of collection)
is ID/IDREF.
|
boolean |
isCollection()
Deprecated.
|
boolean |
isElement()
Deprecated.
always return false at this level.
|
boolean |
isSimpleType()
Returns true if this
NonElement maps to text in XML,
without any attribute nor child elements. |
TypeUse |
makeAdapted(Class<? extends XmlAdapter> adapter,
boolean copy)
Creates a
TypeUse that represents an adapted use of this CBuiltinLeafInfo . |
TypeUse |
makeCollection()
Creates a
TypeUse that represents a collection of this CBuiltinLeafInfo . |
TypeUse |
makeMimeTyped(MimeType mt)
Creates a
TypeUse that represents a MIME-type assocaited version of this CBuiltinLeafInfo . |
JType |
toType(Outline o,
Aspect aspect)
Gets the code model representation of this type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createConstant
getCustomizations
public static final Map<NType,CBuiltinLeafInfo> LEAVES
public static final CBuiltinLeafInfo ANYTYPE
public static final CBuiltinLeafInfo STRING
public static final CBuiltinLeafInfo BOOLEAN
public static final CBuiltinLeafInfo INT
public static final CBuiltinLeafInfo LONG
public static final CBuiltinLeafInfo BYTE
public static final CBuiltinLeafInfo SHORT
public static final CBuiltinLeafInfo FLOAT
public static final CBuiltinLeafInfo DOUBLE
public static final CBuiltinLeafInfo QNAME
public static final CBuiltinLeafInfo CALENDAR
public static final CBuiltinLeafInfo DURATION
public static final CBuiltinLeafInfo BIG_INTEGER
public static final CBuiltinLeafInfo BIG_DECIMAL
public static final CBuiltinLeafInfo BASE64_BYTE_ARRAY
public static final CBuiltinLeafInfo DATA_HANDLER
public static final CBuiltinLeafInfo IMAGE
public static final CBuiltinLeafInfo XML_SOURCE
public static final TypeUse HEXBIN_BYTE_ARRAY
public static final TypeUse TOKEN
public static final TypeUse NORMALIZED_STRING
public static final TypeUse ID
public static final TypeUse BOOLEAN_ZERO_OR_ONE
public static final TypeUse IDREF
XmlJavaTypeAdapter
and XmlIDREF
to interact.public static final TypeUse STRING_LIST
public JType toType(Outline o, Aspect aspect)
toType
in interface CTypeInfo
NType.toType(Outline, Aspect)
@Deprecated public final boolean isCollection()
CBuiltinLeafInfo
represents a default binding,
it is never a collection.isCollection
in interface CNonElement
isCollection
in interface TypeUse
@Deprecated public CNonElement getInfo()
getInfo
in interface CNonElement
getInfo
in interface TypeUse
public ID idUse()
TypeUse
ID is a property of a relationship. When a bean Foo has an ID property called 'bar' whose type is String, Foo isn't an ID, String isn't an ID, but this relationship is an ID (in the sense that Foo uses this String as an ID.)
The same thing can be said with IDREF. When Foo refers to Bar by means of IDREF, neither Foo nor Bar is IDREF.
That's why we have this method in TypeUse
.
public MimeType getExpectedMimeType()
CBuiltinLeafInfo
never has a default associated MIME type.getExpectedMimeType
in interface TypeUse
@Deprecated public final CAdapter getAdapterUse()
CNonElement
getAdapterUse
in interface CNonElement
getAdapterUse
in interface TypeUse
public Locator getLocator()
CCustomizable
getLocator
in interface CCustomizable
public final com.sun.xml.xsom.XSComponent getSchemaComponent()
CCustomizable
getSchemaComponent
in interface CCustomizable
public final TypeUse makeCollection()
TypeUse
that represents a collection of this CBuiltinLeafInfo
.public final TypeUse makeAdapted(Class<? extends XmlAdapter> adapter, boolean copy)
TypeUse
that represents an adapted use of this CBuiltinLeafInfo
.public final TypeUse makeMimeTyped(MimeType mt)
TypeUse
that represents a MIME-type assocaited version of this CBuiltinLeafInfo
.public final boolean isElement()
MaybeElement
Note that when this is true, the class is bound to both an element and a type.
isElement
in interface MaybeElement<NType,NClass>
public final QName getElementName()
MaybeElement
getElementName
in interface MaybeElement<NType,NClass>
MaybeElement.isElement()
.public final Element<NType,NClass> asElement()
MaybeElement
asElement
in interface MaybeElement<NType,NClass>
MaybeElement.isElement()
==false, non-null if MaybeElement.isElement()
==true.public NType getType()
public final QName[] getTypeNames()
public final boolean canBeReferencedByIDREF()
canBeReferencedByIDREF
in interface TypeInfo<NType,NClass>
public QName getTypeName()
NonElement
A Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.
getTypeName
in interface BuiltinLeafInfo<NType,NClass>
getTypeName
in interface NonElement<NType,NClass>
public Locatable getUpstream()
Locatable
Location
information.getUpstream
in interface Locatable
public Location getLocation()
Locatable
getLocation
in interface Locatable
public boolean isSimpleType()
NonElement
NonElement
maps to text in XML,
without any attribute nor child elements.isSimpleType
in interface NonElement<NType,NClass>
Copyright © 2017 JBoss by Red Hat. All rights reserved.