Class CElementPropertyInfo
- java.lang.Object
-
- com.sun.tools.xjc.model.CPropertyInfo
-
- com.sun.tools.xjc.model.CElementPropertyInfo
-
- All Implemented Interfaces:
CCustomizable,com.sun.xml.bind.v2.model.annotation.AnnotationSource,com.sun.xml.bind.v2.model.core.ElementPropertyInfo<NType,NClass>,com.sun.xml.bind.v2.model.core.PropertyInfo<NType,NClass>
public final class CElementPropertyInfo extends CPropertyInfo implements com.sun.xml.bind.v2.model.core.ElementPropertyInfo<NType,NClass>
ElementPropertyInfofor the compiler.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCElementPropertyInfo.CollectionMode
-
Field Summary
-
Fields inherited from class com.sun.tools.xjc.model.CPropertyInfo
baseType, defaultValue, inlineBinaryData, javadoc, locator, realization
-
-
Constructor Summary
Constructors Constructor Description CElementPropertyInfo(String name, CElementPropertyInfo.CollectionMode collection, com.sun.xml.bind.v2.model.core.ID id, MimeType expectedMimeType, XSComponent source, CCustomizations customizations, Locator locator, boolean required)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <V> Vaccept(CPropertyVisitor<V> visitor)<R,P>
Raccept(CPropertyVisitor2<R,P> visitor, P p)QNamecollectElementNames(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.CAdaptergetAdapter()MimeTypegetExpectedMimeType()QNamegetSchemaType()List<CTypeRef>getTypes()QNamegetXmlName()Deprecated.com.sun.xml.bind.v2.model.core.IDid()booleanisCollectionNillable()booleanisCollectionRequired()booleanisOptionalPrimitive()Returns true if this property needs to represent null just for the purpose of representing an absence of the property.booleanisRequired()booleanisUnboxable()Returns true if this property is "unboxable".booleanisValueList()com.sun.xml.bind.v2.model.core.PropertyKindkind()List<CNonElement>ref()voidsetAdapter(CAdapter a)-
Methods inherited from class com.sun.tools.xjc.model.CPropertyInfo
displayName, getCustomizations, getLocator, getName, getName, getSchemaComponent, hasAnnotation, inlineBinaryData, isCollection, needsExplicitTypeName, parent, readAnnotation, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
CElementPropertyInfo
public CElementPropertyInfo(String name, CElementPropertyInfo.CollectionMode collection, com.sun.xml.bind.v2.model.core.ID id, MimeType expectedMimeType, XSComponent source, CCustomizations customizations, Locator locator, boolean required)
-
-
Method Detail
-
id
public com.sun.xml.bind.v2.model.core.ID id()
-
ref
public List<CNonElement> ref()
- Specified by:
refin interfacecom.sun.xml.bind.v2.model.core.PropertyInfo<NType,NClass>- Specified by:
refin classCPropertyInfo
-
getSchemaType
public QName getSchemaType()
-
getXmlName
@Deprecated public QName getXmlName()
Deprecated.XJC never uses the wrapper element. Always return null.
-
isCollectionRequired
public boolean isCollectionRequired()
-
isCollectionNillable
public boolean isCollectionNillable()
-
isRequired
public boolean isRequired()
-
isValueList
public boolean isValueList()
-
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
public <V> V accept(CPropertyVisitor<V> visitor)
- Specified by:
acceptin classCPropertyInfo
-
accept
public <R,P> R accept(CPropertyVisitor2<R,P> visitor, P p)
- Specified by:
acceptin classCPropertyInfo
-
getAdapter
public CAdapter getAdapter()
- Specified by:
getAdapterin interfacecom.sun.xml.bind.v2.model.core.ElementPropertyInfo<NType,NClass>- Specified by:
getAdapterin interfacecom.sun.xml.bind.v2.model.core.PropertyInfo<NType,NClass>- Specified by:
getAdapterin classCPropertyInfo
-
setAdapter
public void setAdapter(CAdapter a)
-
kind
public final com.sun.xml.bind.v2.model.core.PropertyKind kind()
-
getExpectedMimeType
public MimeType getExpectedMimeType()
-
collectElementNames
public QName collectElementNames(Map<QName,CPropertyInfo> table)
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.
-
-