public final class CReferencePropertyInfo extends CPropertyInfo implements ReferencePropertyInfo<NType,NClass>
ReferencePropertyInfo
for the compiler.baseType, defaultValue, inlineBinaryData, javadoc, locator, realization
Constructor and Description |
---|
CReferencePropertyInfo(String name,
boolean collection,
boolean required,
boolean isMixed,
XSComponent source,
CCustomizations customizations,
Locator locator,
boolean dummy,
boolean content,
boolean isMixedExtended) |
Modifier and Type | Method and Description |
---|---|
<V> V |
accept(CPropertyVisitor<V> visitor) |
<R,P> R |
accept(CPropertyVisitor2<R,P> visitor,
P p) |
QName |
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.
|
CAdapter |
getAdapter() |
NClass |
getDOMHandler()
If this property supports the wildcard, returns its DOM handler.
|
Set<CElement> |
getElements()
Returns the information about the possible elements in this property.
|
MimeType |
getExpectedMimeType()
Expected MIME type, if any.
|
QName |
getSchemaType()
The effective value of
XmlSchemaType annotation, if any. |
WildcardMode |
getWildcard()
If this property supports the wildcard, returns its mode.
|
QName |
getXmlName()
Deprecated.
|
ID |
id()
A reference property can never be ID/IDREF because they always point to
other element classes.
|
boolean |
isCollectionNillable()
Returns true if this property is nillable
(meaning the absence of the value is treated as nil='true')
|
boolean |
isCollectionRequired()
Checks if the wrapper element is required.
|
boolean |
isContent() |
boolean |
isDummy() |
boolean |
isMixed()
Returns true if this property can hold
String s to represent
mixed content model. |
boolean |
isMixedExtendedCust() |
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 element is mandatory.
|
boolean |
isUnboxable()
Reference properties refer to elements, and none of the Java primitive type
maps to an element.
|
PropertyKind |
kind()
Gets the kind of this property.
|
Set<? extends CTypeInfo> |
ref()
List of
TypeInfo s that this property references. |
void |
setWildcard(WildcardMode mode) |
displayName, getCustomizations, getLocator, getName, getName, getSchemaComponent, hasAnnotation, inlineBinaryData, isCollection, needsExplicitTypeName, parent, readAnnotation, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
displayName, getName, inlineBinaryData, isCollection, parent
hasAnnotation, readAnnotation
public CReferencePropertyInfo(String name, boolean collection, boolean required, boolean isMixed, XSComponent source, CCustomizations customizations, Locator locator, boolean dummy, boolean content, boolean isMixedExtended)
public Set<? extends CTypeInfo> ref()
PropertyInfo
TypeInfo
s that this property references.
This allows the caller to traverse the reference graph without
getting into the details of each different property type.ref
in interface PropertyInfo<NType,NClass>
ref
in interface ReferencePropertyInfo<NType,NClass>
ref
in class CPropertyInfo
public Set<CElement> getElements()
ReferencePropertyInfo
As of 2004/08/17, the spec only allows you to use different element names when a property is a collection, but I think there's really no reason to limit it there --- if the user wants to use a different tag name for different objects, I don't see why this can be limited to collections.
So this is a generalization of the spec. We always allow a property to have multiple types and use different tag names for it, depending on the actual type.
In most of the cases, this collection only contains 1 item. So the runtime system is encouraged to provide a faster code-path that is optimized toward such cases.
getElements
in interface ReferencePropertyInfo<NType,NClass>
public boolean isMixed()
ReferencePropertyInfo
String
s to represent
mixed content model.isMixed
in interface ReferencePropertyInfo<NType,NClass>
public boolean isDummy()
public boolean isContent()
public boolean isMixedExtendedCust()
@Deprecated public QName getXmlName()
getXmlName
in interface ReferencePropertyInfo<NType,NClass>
public boolean isUnboxable()
isUnboxable
in class CPropertyInfo
public boolean isOptionalPrimitive()
CPropertyInfo
isOptionalPrimitive
in class CPropertyInfo
public <V> V accept(CPropertyVisitor<V> visitor)
accept
in class CPropertyInfo
public <R,P> R accept(CPropertyVisitor2<R,P> visitor, P p)
accept
in class CPropertyInfo
public CAdapter getAdapter()
getAdapter
in interface PropertyInfo<NType,NClass>
getAdapter
in interface ReferencePropertyInfo<NType,NClass>
getAdapter
in class CPropertyInfo
public final PropertyKind kind()
PropertyInfo
kind
in interface PropertyInfo<NType,NClass>
public ID id()
public WildcardMode getWildcard()
ReferencePropertyInfo
getWildcard
in interface ReferencePropertyInfo<NType,NClass>
public void setWildcard(WildcardMode mode)
public NClass getDOMHandler()
ReferencePropertyInfo
getDOMHandler
in interface ReferencePropertyInfo<NType,NClass>
public MimeType getExpectedMimeType()
PropertyInfo
getExpectedMimeType
in interface PropertyInfo<NType,NClass>
public boolean isCollectionNillable()
ReferencePropertyInfo
This method is only used when this property is a collection.
isCollectionNillable
in interface ReferencePropertyInfo<NType,NClass>
public boolean isCollectionRequired()
ReferencePropertyInfo
isCollectionRequired
in interface ReferencePropertyInfo<NType,NClass>
ReferencePropertyInfo.getXmlName()
==null.public QName getSchemaType()
PropertyInfo
XmlSchemaType
annotation, if any.
If the property doesn't have XmlSchemaType
annotation,
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 of XmlSchemaType
(namely
when this returns non-null, it overrides the type names of all types
that are in this property.)
getSchemaType
in interface PropertyInfo<NType,NClass>
public boolean isRequired()
ReferencePropertyInfo
isRequired
in interface ReferencePropertyInfo<NType,NClass>
public QName collectElementNames(Map<QName,CPropertyInfo> table)
CPropertyInfo
collectElementNames
in class CPropertyInfo
Copyright © 2021 JBoss by Red Hat. All rights reserved.