|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.model.impl.PropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
com.sun.xml.bind.v2.model.impl.ERPropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
class ElementPropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
Common ElementPropertyInfo
implementation used for both
APT and runtime.
Field Summary |
---|
Fields inherited from class com.sun.xml.bind.v2.model.impl.PropertyInfoImpl |
---|
parent, seed |
Constructor Summary | |
---|---|
ElementPropertyInfoImpl(ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed)
|
Method Summary | |
---|---|
protected TypeRefImpl<TypeT,ClassDeclT> |
createTypeRef(QName name,
TypeT type,
boolean isNillable,
String defaultValue)
Used by PropertyInfoImpl to create new instances of TypeRef |
List<? extends TypeRefImpl<TypeT,ClassDeclT>> |
getTypes()
Returns the information about the types allowed in this property. |
boolean |
isRequired()
Returns true if this element is mandatory. |
boolean |
isValueList()
Returns true if this property is a collection but its XML representation is a list of values, not repeated elements. |
PropertyKind |
kind()
Gets the kind of this proeprty. |
protected void |
link()
Called after all the TypeInfo s are collected into the governing TypeInfoSet . |
List<? extends TypeInfo<TypeT,ClassDeclT>> |
ref()
List of TypeInfo s that this property references. |
Methods inherited from class com.sun.xml.bind.v2.model.impl.ERPropertyInfoImpl |
---|
getXmlName, isCollectionNillable, isCollectionRequired |
Methods inherited from class com.sun.xml.bind.v2.model.impl.PropertyInfoImpl |
---|
calcXmlName, calcXmlName, compareTo, displayName, getAdapter, getExpectedMimeType, getIndividualType, getLocation, getName, getRawType, getSchemaType, getUpstream, hasAnnotation, id, inlineBinaryData, isCollection, nav, parent, readAnnotation, reader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.xml.bind.v2.model.core.ElementPropertyInfo |
---|
getAdapter, getXmlName, isCollectionNillable, isCollectionRequired |
Methods inherited from interface com.sun.xml.bind.v2.model.core.PropertyInfo |
---|
displayName, getExpectedMimeType, getName, getSchemaType, id, inlineBinaryData, isCollection, parent |
Methods inherited from interface com.sun.xml.bind.v2.model.annotation.AnnotationSource |
---|
hasAnnotation, readAnnotation |
Constructor Detail |
---|
ElementPropertyInfoImpl(ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent, PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed)
Method Detail |
---|
public List<? extends TypeRefImpl<TypeT,ClassDeclT>> getTypes()
ElementPropertyInfo
In a simple case like the following, an element property only has
one TypeRef
that points to String
and tag name "foo".
@XmlElement String abc;
However, in a general case an element property can be heterogeneous, meaning you can put different types in it, each with a different tag name (and a few other settings.)
// list can contain String or Integer. @XmlElements({ @XmlElement(name="a",type=String.class), @XmlElement(name="b",type=Integer.class), }) List<Object> abc;
In this case this method returns a list of two TypeRef
s.
getTypes
in interface ElementPropertyInfo<TypeT,ClassDeclT>
ElementPropertyInfo.isValueList()
==true, there's always exactly one type.protected TypeRefImpl<TypeT,ClassDeclT> createTypeRef(QName name, TypeT type, boolean isNillable, String defaultValue)
PropertyInfoImpl
to create new instances of TypeRef
public boolean isValueList()
ElementPropertyInfo
If PropertyInfo.isCollection()
==false, this property is always false.
When this flag is true, getTypes().size()==1 always holds.
isValueList
in interface ElementPropertyInfo<TypeT,ClassDeclT>
public boolean isRequired()
ElementPropertyInfo
isRequired
in interface ElementPropertyInfo<TypeT,ClassDeclT>
public List<? extends TypeInfo<TypeT,ClassDeclT>> 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<TypeT,ClassDeclT>
public final PropertyKind kind()
PropertyInfo
kind
in interface PropertyInfo<TypeT,ClassDeclT>
protected void link()
PropertyInfoImpl
TypeInfo
s are collected into the governing TypeInfoSet
.
Derived class can do additional actions to complete the model.
link
in class PropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |