Class CBuiltinLeafInfo
- All Implemented Interfaces:
CCustomizable,CNonElement,CTypeInfo,TypeUse,org.glassfish.jaxb.core.v2.model.annotation.Locatable,org.glassfish.jaxb.core.v2.model.core.BuiltinLeafInfo<NType,,NClass> org.glassfish.jaxb.core.v2.model.core.LeafInfo<NType,,NClass> org.glassfish.jaxb.core.v2.model.core.MaybeElement<NType,,NClass> org.glassfish.jaxb.core.v2.model.core.NonElement<NType,,NClass> org.glassfish.jaxb.core.v2.model.core.TypeInfo<NType,,NClass> org.glassfish.jaxb.core.v2.runtime.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.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final TypeUseboolean restricted to 0 or 1.static final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final TypeUsestatic final TypeUsestatic final TypeUseIDREF.static final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final Map<NType,CBuiltinLeafInfo> All built-in leaves.static final CBuiltinLeafInfostatic final TypeUsestatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final CBuiltinLeafInfostatic final TypeUseFor all list of strings, such as NMTOKENS, ENTITIES.static final TypeUsestatic final CBuiltinLeafInfoFields inherited from interface org.glassfish.jaxb.core.v2.model.core.NonElement
ANYTYPE_NAME -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.always return null at this level.final booleanDeprecated.why are you calling a method whose return value is always known?final CAdapterDeprecated.final QNameDeprecated.always return null at this level.jakarta.activation.MimeTypeCBuiltinLeafInfonever has a default associated MIME type.getInfo()Deprecated.org.glassfish.jaxb.core.v2.runtime.LocationGets the source location in the schema from which this model component is created.final XSComponentIf this model object is built from XML Schema, this property returns a schema component from which the model is built.getType()A reference to the representation of the type.final QName[]Returns all the type names recognized by this bean info.org.glassfish.jaxb.core.v2.model.annotation.Locatableorg.glassfish.jaxb.core.v2.model.core.IDidUse()Whether the referenced type (individual item type in case of collection) is ID/IDREF.final booleanDeprecated.final booleanDeprecated.always return false at this level.booleanfinal TypeUsemakeAdapted(Class<? extends jakarta.xml.bind.annotation.adapters.XmlAdapter> adapter, boolean copy) Creates aTypeUsethat represents an adapted use of thisCBuiltinLeafInfo.final TypeUseCreates aTypeUsethat represents a collection of thisCBuiltinLeafInfo.final TypeUsemakeMimeTyped(jakarta.activation.MimeType mt) Creates aTypeUsethat represents a MIME-type assocaited version of thisCBuiltinLeafInfo.Gets the code model representation of this type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sun.tools.xjc.model.CCustomizable
getCustomizationsMethods inherited from interface org.glassfish.jaxb.core.v2.runtime.Location
toStringMethods inherited from interface com.sun.tools.xjc.model.TypeUse
createConstant
-
Field Details
-
LEAVES
All built-in leaves. -
ANYTYPE
-
STRING
-
BOOLEAN
-
INT
-
LONG
-
BYTE
-
SHORT
-
FLOAT
-
DOUBLE
-
QNAME
-
CALENDAR
-
DURATION
-
BIG_INTEGER
-
BIG_DECIMAL
-
BASE64_BYTE_ARRAY
-
DATA_HANDLER
-
IMAGE
-
XML_SOURCE
-
HEXBIN_BYTE_ARRAY
-
TOKEN
-
NORMALIZED_STRING
-
ID
-
BOOLEAN_ZERO_OR_ONE
boolean restricted to 0 or 1. -
IDREF
IDREF. IDREF is has a whitespace normalization semantics of token, but we don't wantXmlJavaTypeAdapterandXmlIDREFto interact. -
STRING_LIST
For all list of strings, such as NMTOKENS, ENTITIES.
-
-
Method Details
-
toType
Gets the code model representation of this type. -
isCollection
Deprecated.SinceCBuiltinLeafInforepresents a default binding, it is never a collection.- Specified by:
isCollectionin interfaceCNonElement- Specified by:
isCollectionin interfaceTypeUse
-
getInfo
Deprecated.Guaranteed to return this.- Specified by:
getInfoin interfaceCNonElement- Specified by:
getInfoin interfaceTypeUse
-
idUse
public org.glassfish.jaxb.core.v2.model.core.ID idUse()Description copied from interface:TypeUseWhether the referenced type (individual item type in case of collection) is ID/IDREF.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. -
getExpectedMimeType
public jakarta.activation.MimeType getExpectedMimeType()CBuiltinLeafInfonever has a default associated MIME type.- Specified by:
getExpectedMimeTypein interfaceTypeUse
-
getAdapterUse
Deprecated.Description copied from interface:CNonElementGuaranteed to return null.- Specified by:
getAdapterUsein interfaceCNonElement- Specified by:
getAdapterUsein interfaceTypeUse
-
getLocator
Description copied from interface:CCustomizableGets the source location in the schema from which this model component is created.- Specified by:
getLocatorin interfaceCCustomizable- Returns:
- never null.
-
getSchemaComponent
Description copied from interface:CCustomizableIf this model object is built from XML Schema, this property returns a schema component from which the model is built.- Specified by:
getSchemaComponentin interfaceCCustomizable- Returns:
- null if the model is built from sources other than XML Schema (such as DTD.)
-
makeCollection
Creates aTypeUsethat represents a collection of thisCBuiltinLeafInfo. -
makeAdapted
public final TypeUse makeAdapted(Class<? extends jakarta.xml.bind.annotation.adapters.XmlAdapter> adapter, boolean copy) Creates aTypeUsethat represents an adapted use of thisCBuiltinLeafInfo. -
makeMimeTyped
Creates aTypeUsethat represents a MIME-type assocaited version of thisCBuiltinLeafInfo. -
isElement
Deprecated.always return false at this level. -
getElementName
Deprecated.always return null at this level. -
asElement
Deprecated.always return null at this level. -
getType
A reference to the representation of the type. -
getTypeNames
Returns all the type names recognized by this bean info.- Returns:
- do not modify the returned array.
-
canBeReferencedByIDREF
Deprecated.why are you calling a method whose return value is always known?Leaf-type cannot be referenced from IDREF. -
getTypeName
-
getUpstream
public org.glassfish.jaxb.core.v2.model.annotation.Locatable getUpstream()- Specified by:
getUpstreamin interfaceorg.glassfish.jaxb.core.v2.model.annotation.Locatable
-
getLocation
public org.glassfish.jaxb.core.v2.runtime.Location getLocation()- Specified by:
getLocationin interfaceorg.glassfish.jaxb.core.v2.model.annotation.Locatable
-
isSimpleType
public boolean isSimpleType()
-