- java.lang.Object
-
- com.sun.tools.xjc.model.CPropertyInfo
-
- 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 CPropertyInfo implements AttributePropertyInfo<NType,NClass>
AttributePropertyInfofor the compiler.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description protected TypeUsetype-
Fields inherited from class com.sun.tools.xjc.model.CPropertyInfo
baseType, defaultValue, inlineBinaryData, javadoc, locator, realization
-
-
Constructor Summary
Constructors Constructor Description CAttributePropertyInfo(String name, XSComponent source, CCustomizations customizations, Locator locator, QName attName, TypeUse type, QName typeName, boolean required)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> Vaccept(CPropertyVisitor<V> visitor)<R,P>
Raccept(CPropertyVisitor2<R,P> visitor, P p)CAdaptergetAdapter()jakarta.activation.MimeTypegetExpectedMimeType()Expected MIME type, if any.QNamegetSchemaType()The effective value ofXmlSchemaTypeannotation, if any.com.sun.tools.xjc.model.CSingleTypePropertyInfogetSource()CNonElementgetTarget()QNamegetXmlName()Gets the attribute name.IDid()Returns the IDness of the value of this element.booleanisOptionalPrimitive()Returns true if this property needs to represent null just for the purpose of representing an absence of the property.booleanisRequired()Returns true if this attribute is mandatory.booleanisUnboxable()An optional attribute can never be unboxable, for we need null to represent the absence.PropertyKindkind()Gets the kind of this property.List<? extends CTypeInfo>ref()List ofTypeInfos that this property references.-
Methods inherited from class com.sun.tools.xjc.model.CPropertyInfo
collectElementNames, 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
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.annotation.AnnotationSource
hasAnnotation, readAnnotation
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.AttributePropertyInfo
getAdapter, getTarget
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.NonElementRef
getSource
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.PropertyInfo
displayName, getExpectedMimeType, getName, getSchemaType, id, inlineBinaryData, isCollection, parent, ref
-
-
-
-
Field Detail
-
type
protected final TypeUse type
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
isRequired
public boolean isRequired()
Description copied from interface:AttributePropertyInfoReturns true if this attribute is mandatory.- Specified by:
isRequiredin interfaceAttributePropertyInfo<NType,NClass>
-
getXmlName
public QName getXmlName()
Description copied from interface:AttributePropertyInfoGets the attribute name.- Specified by:
getXmlNamein interfaceAttributePropertyInfo<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:
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
-
kind
public final PropertyKind kind()
Description copied from interface:PropertyInfoGets the kind of this property.- Specified by:
kindin interfacePropertyInfo<NType,NClass>- Returns:
- always non-null.
-
getSchemaType
public QName getSchemaType()
Description copied from interface:PropertyInfoThe effective value ofXmlSchemaTypeannotation, if any.If the property doesn't have
XmlSchemaTypeannotation, this method returns null.Since a type name is a property of a Java type, not a Java property, A schema type name of a Java type should be primarily obtained by using
NonElement.getTypeName(). This method is to correctly implement the ugly semantics ofXmlSchemaType(namely when this returns non-null, it overrides the type names of all types that are in this property.)
-
id
public final ID id()
Description copied from interface:PropertyInfoReturns the IDness of the value of this element.- Returns:
- always non-null
- See Also:
XmlID,XmlIDREF
-
getExpectedMimeType
public final jakarta.activation.MimeType getExpectedMimeType()
Description copied from interface:PropertyInfoExpected MIME type, if any.
-
ref
public final List<? extends CTypeInfo> ref()
Description copied from interface:PropertyInfoList ofTypeInfos that this property references. This allows the caller to traverse the reference graph without getting into the details of each different property type.- Specified by:
refin interfacePropertyInfo<NType,NClass>- Specified by:
refin classCPropertyInfo- Returns:
- non-null read-only collection.
-
getTarget
public final CNonElement getTarget()
-
getAdapter
public final CAdapter getAdapter()
- Specified by:
getAdapterin interfacePropertyInfo<NType,NClass>- Specified by:
getAdapterin classCPropertyInfo- Returns:
- null if the property is not adapted.
-
getSource
public final com.sun.tools.xjc.model.CSingleTypePropertyInfo getSource()
-
-