Class CElementPropertyInfo
- All Implemented Interfaces:
CCustomizable,AnnotationSource,ElementPropertyInfo<NType,,NClass> PropertyInfo<NType,NClass>
ElementPropertyInfo for the compiler.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.sun.tools.xjc.model.CPropertyInfo
baseType, defaultValue, inlineBinaryData, javadoc, locator, realization -
Constructor Summary
ConstructorsConstructorDescriptionCElementPropertyInfo(String name, CElementPropertyInfo.CollectionMode collection, ID id, MimeType expectedMimeType, XSComponent source, CCustomizations customizations, Locator locator, boolean required) -
Method Summary
Modifier and TypeMethodDescription<V> Vaccept(CPropertyVisitor<V> visitor) <R,P> R accept(CPropertyVisitor2<R, P> visitor, P p) collectElementNames(Map<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.getTypes()Deprecated.id()booleanbooleanbooleanReturns true if this property needs to represent null just for the purpose of representing an absence of the property.booleanbooleanReturns true if this property is "unboxable".booleankind()ref()voidMethods inherited from class com.sun.tools.xjc.model.CPropertyInfo
displayName, getCustomizations, getLocator, getName, getName, getSchemaComponent, hasAnnotation, inlineBinaryData, isCollection, needsExplicitTypeName, parent, readAnnotation, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glassfish.jaxb.core.v2.model.annotation.AnnotationSource
hasAnnotation, readAnnotationMethods inherited from interface org.glassfish.jaxb.core.v2.model.core.PropertyInfo
displayName, getName, inlineBinaryData, isCollection, parent
-
Constructor Details
-
CElementPropertyInfo
public CElementPropertyInfo(String name, CElementPropertyInfo.CollectionMode collection, ID id, MimeType expectedMimeType, XSComponent source, CCustomizations customizations, Locator locator, boolean required)
-
-
Method Details
-
id
- Specified by:
idin interfacePropertyInfo<NType,NClass>
-
getTypes
- Specified by:
getTypesin interfaceElementPropertyInfo<NType,NClass>
-
ref
- Specified by:
refin interfacePropertyInfo<NType,NClass> - Specified by:
refin classCPropertyInfo
-
getSchemaType
- Specified by:
getSchemaTypein interfacePropertyInfo<NType,NClass>
-
getXmlName
Deprecated.XJC never uses the wrapper element. Always return null.- Specified by:
getXmlNamein interfaceElementPropertyInfo<NType,NClass>
-
isCollectionRequired
public boolean isCollectionRequired()- Specified by:
isCollectionRequiredin interfaceElementPropertyInfo<NType,NClass>
-
isCollectionNillable
public boolean isCollectionNillable()- Specified by:
isCollectionNillablein interfaceElementPropertyInfo<NType,NClass>
-
isRequired
public boolean isRequired()- Specified by:
isRequiredin interfaceElementPropertyInfo<NType,NClass>
-
isValueList
public boolean isValueList()- Specified by:
isValueListin interfaceElementPropertyInfo<NType,NClass>
-
isUnboxable
public boolean isUnboxable()Description copied from class:CPropertyInfoReturns true if this property is "unboxable".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.
- Overrides:
isUnboxablein classCPropertyInfo
-
isOptionalPrimitive
public boolean isOptionalPrimitive()Description copied from class:CPropertyInfoReturns true if this property needs to represent null just for the purpose of representing an absence of the property.- Overrides:
isOptionalPrimitivein classCPropertyInfo
-
accept
- Specified by:
acceptin classCPropertyInfo
-
accept
- Specified by:
acceptin classCPropertyInfo
-
getAdapter
- Specified by:
getAdapterin interfaceElementPropertyInfo<NType,NClass> - Specified by:
getAdapterin interfacePropertyInfo<NType,NClass> - Specified by:
getAdapterin classCPropertyInfo
-
setAdapter
-
kind
- Specified by:
kindin interfacePropertyInfo<NType,NClass>
-
getExpectedMimeType
- Specified by:
getExpectedMimeTypein interfacePropertyInfo<NType,NClass>
-
collectElementNames
Description copied from class:CPropertyInfoPuts 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.- Overrides:
collectElementNamesin classCPropertyInfo- Returns:
- null if no conflict was found. Otherwise return the QName that has the collision.
-