|
||||||||||
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.ElementInfoImpl.PropertyImpl
protected class ElementInfoImpl.PropertyImpl
Singleton instance of ElementPropertyInfo
for this element.
Constructor Summary | |
---|---|
protected |
ElementInfoImpl.PropertyImpl()
|
Method Summary | ||
---|---|---|
java.lang.String |
displayName()
Gets the display name of the property. |
|
Adapter<TypeT,ClassDeclT> |
getAdapter()
|
|
java.lang.String |
getDefaultValue()
The default value for this element if any. |
|
javax.activation.MimeType |
getExpectedMimeType()
Expected MIME type, if any. |
|
java.lang.String |
getName()
Gets the name of the property. |
|
javax.xml.namespace.QName |
getSchemaType()
The effective value of XmlSchemaType annotation, if any. |
|
PropertyInfo<TypeT,ClassDeclT> |
getSource()
Gets the property which is the source of this reference. |
|
javax.xml.namespace.QName |
getTagName()
The associated element name. |
|
NonElement |
getTarget()
Target of the reference. |
|
java.util.List<? extends TypeRef<TypeT,ClassDeclT>> |
getTypes()
Returns the information about the types allowed in this property. |
|
javax.xml.namespace.QName |
getXmlName()
Gets the wrapper element name. |
|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns true if the property has the specified annotation. |
|
ID |
id()
Returns the IDness of the value of this element. |
|
boolean |
inlineBinaryData()
If this is true and this property indeed represents a binary data, it should be always inlined. |
|
boolean |
isCollection()
Returns true if this is a multi-valued collection property. |
|
boolean |
isCollectionNillable()
Returns true if this property is nillable (meaning the absence of the value is treated as nil='true') |
|
boolean |
isNillable()
Returns true if this element is nillable. |
|
boolean |
isRequired()
Returns true if this element is mandatory. |
|
boolean |
isValueList()
For ElementInfo s, a collection always means a list of values. |
|
PropertyKind |
kind()
Gets the kind of this proeprty. |
|
ElementInfoImpl |
parent()
Gets the ClassInfo or ElementInfo to which this property belongs. |
|
|
readAnnotation(java.lang.Class<A> annotationType)
Gets the value of the specified annotation from the given property. |
|
java.util.List<? extends NonElement<TypeT,ClassDeclT>> |
ref()
List of TypeInfo s that this property references. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ElementInfoImpl.PropertyImpl()
Method Detail |
---|
public NonElement getTarget()
NonElementRef
getTarget
in interface NonElementRef<TypeT,ClassDeclT>
public javax.xml.namespace.QName getTagName()
TypeRef
getTagName
in interface TypeRef<TypeT,ClassDeclT>
public java.util.List<? extends TypeRef<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.public java.util.List<? extends NonElement<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 javax.xml.namespace.QName getXmlName()
ElementPropertyInfo
getXmlName
in interface ElementPropertyInfo<TypeT,ClassDeclT>
PropertyInfo.isCollection()
==false or
if ElementPropertyInfo.isValueList()
==true.
Otherwise,
this can be null (in which case there'll be no wrapper),
or it can be non-null (in which case there'll be a wrapper)public boolean isCollectionNillable()
ElementPropertyInfo
This method is only used when this property is a collection.
isCollectionNillable
in interface ElementPropertyInfo<TypeT,ClassDeclT>
public boolean isNillable()
TypeRef
isNillable
in interface TypeRef<TypeT,ClassDeclT>
public java.lang.String getDefaultValue()
TypeRef
getDefaultValue
in interface TypeRef<TypeT,ClassDeclT>
public ElementInfoImpl parent()
PropertyInfo
ClassInfo
or ElementInfo
to which this property belongs.
parent
in interface PropertyInfo<TypeT,ClassDeclT>
public java.lang.String getName()
PropertyInfo
For example, "foo" or "bar". This doesn't directly affect XML. The property name uniquely identifies a property within a class.
getName
in interface PropertyInfo<TypeT,ClassDeclT>
XmlType.propOrder()
public java.lang.String displayName()
PropertyInfo
This is a convenience method for
parent().getName()+'#'+getName()
.
displayName
in interface PropertyInfo<TypeT,ClassDeclT>
public boolean isCollection()
PropertyInfo
isCollection
in interface PropertyInfo<TypeT,ClassDeclT>
public boolean isValueList()
ElementInfo
s, a collection always means a list of values.
isValueList
in interface ElementPropertyInfo<TypeT,ClassDeclT>
public boolean isRequired()
ElementPropertyInfo
isRequired
in interface ElementPropertyInfo<TypeT,ClassDeclT>
public PropertyKind kind()
PropertyInfo
kind
in interface PropertyInfo<TypeT,ClassDeclT>
public Adapter<TypeT,ClassDeclT> getAdapter()
getAdapter
in interface ElementPropertyInfo<TypeT,ClassDeclT>
getAdapter
in interface PropertyInfo<TypeT,ClassDeclT>
public ID id()
PropertyInfo
id
in interface PropertyInfo<TypeT,ClassDeclT>
XmlID
,
XmlIDREF
public javax.activation.MimeType getExpectedMimeType()
PropertyInfo
getExpectedMimeType
in interface PropertyInfo<TypeT,ClassDeclT>
public javax.xml.namespace.QName getSchemaType()
PropertyInfo
XmlSchemaType
annotation, if any.
getSchemaType
in interface PropertyInfo<TypeT,ClassDeclT>
public boolean inlineBinaryData()
PropertyInfo
inlineBinaryData
in interface PropertyInfo<TypeT,ClassDeclT>
public PropertyInfo<TypeT,ClassDeclT> getSource()
NonElementRef
getSource
in interface NonElementRef<TypeT,ClassDeclT>
public <A extends java.lang.annotation.Annotation> A readAnnotation(java.lang.Class<A> annotationType)
AnnotationSource
When this method is used for a property that consists of a getter and setter, it returns the annotation on either of those methods. If both methods have the same annotation, it is an error.
readAnnotation
in interface AnnotationSource
public boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
AnnotationSource
Short for readAnnotation(annotationType)!=null
,
but this method is typically faster.
hasAnnotation
in interface AnnotationSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |