com.sun.tools.xjc.model
Class CAttributePropertyInfo
java.lang.Object
com.sun.tools.xjc.model.CPropertyInfo
com.sun.tools.xjc.model.CSingleTypePropertyInfo
com.sun.tools.xjc.model.CAttributePropertyInfo
- All Implemented Interfaces:
- CCustomizable, AnnotationSource, AttributePropertyInfo<NType,NClass>, NonElementRef<NType,NClass>, PropertyInfo<NType,NClass>
public final class CAttributePropertyInfo
- extends CSingleTypePropertyInfo
- implements AttributePropertyInfo<NType,NClass>
AttributePropertyInfo
for the compiler.
Method Summary |
|
accept(CPropertyVisitor<V> visitor)
|
QName |
getXmlName()
Gets the attribute name. |
boolean |
isOptionalPrimitive()
Returns true if this property needs to represent null
just for the purpose of representing an absence of the property. |
boolean |
isRequired()
Returns true if this attribute is mandatory. |
boolean |
isUnboxable()
An optional attribute can never be unboxable,
for we need null to represent the absence. |
PropertyKind |
kind()
Gets the kind of this proeprty. |
Methods inherited from class com.sun.tools.xjc.model.CPropertyInfo |
collectElementNames, displayName, getCustomizations, getLocator, getName, getName, getSchemaComponent, hasAnnotation, inlineBinaryData, isCollection, needsExplicitTypeName, parent, readAnnotation, setName, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CAttributePropertyInfo
public CAttributePropertyInfo(String name,
XSComponent source,
CCustomizations customizations,
Locator locator,
QName attName,
TypeUse type,
@Nullable
QName typeName,
boolean required)
- Parameters:
type
- Represents the bound type of this attribute.typeName
- XML Schema type name of this attribute. Optional for other schema languages.
isRequired
public boolean isRequired()
- Description copied from interface:
AttributePropertyInfo
- Returns true if this attribute is mandatory.
- Specified by:
isRequired
in interface AttributePropertyInfo<NType,NClass>
getXmlName
public QName getXmlName()
- Description copied from interface:
AttributePropertyInfo
- Gets the attribute name.
- Specified by:
getXmlName
in interface AttributePropertyInfo<NType,NClass>
- Returns:
- must be non-null.
isUnboxable
public boolean isUnboxable()
- An optional attribute can never be unboxable,
for we need null to represent the absence.
- Overrides:
isUnboxable
in class CPropertyInfo
isOptionalPrimitive
public boolean isOptionalPrimitive()
- Description copied from class:
CPropertyInfo
- Returns true if this property needs to represent null
just for the purpose of representing an absence of the property.
- Overrides:
isOptionalPrimitive
in class CPropertyInfo
accept
public <V> V accept(CPropertyVisitor<V> visitor)
- Specified by:
accept
in class CPropertyInfo
kind
public final PropertyKind kind()
- Description copied from interface:
PropertyInfo
- Gets the kind of this proeprty.
- Specified by:
kind
in interface PropertyInfo<NType,NClass>
- Returns:
- always non-null.