CCustomizable, AnnotationSource, ElementPropertyInfo<NType,NClass>, PropertyInfo<NType,NClass>public final class CElementPropertyInfo extends CPropertyInfo implements ElementPropertyInfo<NType,NClass>
ElementPropertyInfo for the compiler.| Modifier and Type | Class | Description |
|---|---|---|
static class |
CElementPropertyInfo.CollectionMode |
baseType, defaultValue, inlineBinaryData, javadoc, locator, realization| Constructor | Description |
|---|---|
CElementPropertyInfo(java.lang.String name,
CElementPropertyInfo.CollectionMode collection,
ID id,
javax.activation.MimeType expectedMimeType,
com.sun.xml.xsom.XSComponent source,
CCustomizations customizations,
org.xml.sax.Locator locator,
boolean required) |
| Modifier and Type | Method | Description |
|---|---|---|
<V> V |
accept(CPropertyVisitor<V> visitor) |
|
<R,P> R |
accept(CPropertyVisitor2<R,P> visitor,
P p) |
|
javax.xml.namespace.QName |
collectElementNames(java.util.Map<javax.xml.namespace.QName,CPropertyInfo> table) |
Puts the element names that this property possesses to the map,
so that we can find two properties that own the same element name,
which is an error.
|
CAdapter |
getAdapter() |
|
javax.activation.MimeType |
getExpectedMimeType() |
|
javax.xml.namespace.QName |
getSchemaType() |
|
java.util.List<CTypeRef> |
getTypes() |
|
javax.xml.namespace.QName |
getXmlName() |
Deprecated.
|
ID |
id() |
|
boolean |
isCollectionNillable() |
|
boolean |
isCollectionRequired() |
|
boolean |
isOptionalPrimitive() |
Returns true if this property needs to represent null
just for the purpose of representing an absence of the property.
|
boolean |
isRequired() |
|
boolean |
isUnboxable() |
Returns true if this property is "unboxable".
|
boolean |
isValueList() |
|
PropertyKind |
kind() |
|
java.util.List<CNonElement> |
ref() |
|
void |
setAdapter(CAdapter a) |
hasAnnotation, readAnnotationdisplayName, getCustomizations, getLocator, getName, getName, getSchemaComponent, hasAnnotation, inlineBinaryData, isCollection, needsExplicitTypeName, parent, readAnnotation, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisplayName, getName, inlineBinaryData, isCollection, parentpublic CElementPropertyInfo(java.lang.String name,
CElementPropertyInfo.CollectionMode collection,
ID id,
javax.activation.MimeType expectedMimeType,
com.sun.xml.xsom.XSComponent source,
CCustomizations customizations,
org.xml.sax.Locator locator,
boolean required)
public ID id()
id in interface PropertyInfo<NType,NClass>public java.util.List<CTypeRef> getTypes()
getTypes in interface ElementPropertyInfo<NType,NClass>public java.util.List<CNonElement> ref()
ref in interface PropertyInfo<NType,NClass>ref in class CPropertyInfopublic javax.xml.namespace.QName getSchemaType()
getSchemaType in interface PropertyInfo<NType,NClass>@Deprecated public javax.xml.namespace.QName getXmlName()
getXmlName in interface ElementPropertyInfo<NType,NClass>public boolean isCollectionRequired()
isCollectionRequired in interface ElementPropertyInfo<NType,NClass>public boolean isCollectionNillable()
isCollectionNillable in interface ElementPropertyInfo<NType,NClass>public boolean isRequired()
isRequired in interface ElementPropertyInfo<NType,NClass>public boolean isValueList()
isValueList in interface ElementPropertyInfo<NType,NClass>public boolean isUnboxable()
CPropertyInfo
In general, a property often has to be capable of representing null
to indicate the absence of the value. This requires properties
to be generated as @XmlElement Float f, not as
@XmlElement float f;. But this is slow.
Fortunately, there are cases where we know that the property can never legally be absent. When this condition holds we can generate the optimized "unboxed form".
The exact such conditions depend on the kind of properties, so refer to the implementation code for the details.
This method returns true when the property can be generated as "unboxed form", false otherwise.
When this property is a collection, this method returns true if items in the collection is unboxable. Obviously, the collection itself is always a reference type.
isUnboxable in class CPropertyInfopublic boolean isOptionalPrimitive()
CPropertyInfoisOptionalPrimitive in class CPropertyInfopublic <V> V accept(CPropertyVisitor<V> visitor)
accept in class CPropertyInfopublic <R,P> R accept(CPropertyVisitor2<R,P> visitor, P p)
accept in class CPropertyInfopublic CAdapter getAdapter()
getAdapter in interface ElementPropertyInfo<NType,NClass>getAdapter in interface PropertyInfo<NType,NClass>getAdapter in class CPropertyInfopublic void setAdapter(CAdapter a)
public final PropertyKind kind()
kind in interface PropertyInfo<NType,NClass>public javax.activation.MimeType getExpectedMimeType()
getExpectedMimeType in interface PropertyInfo<NType,NClass>public javax.xml.namespace.QName collectElementNames(java.util.Map<javax.xml.namespace.QName,CPropertyInfo> table)
CPropertyInfocollectElementNames in class CPropertyInfoCopyright © 2018 Oracle Corporation. All rights reserved.