|
||||||||||
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
com.sun.xml.bind.v2.model.impl.RuntimeElementInfoImpl.RuntimePropertyImpl
class RuntimeElementInfoImpl.RuntimePropertyImpl
Constructor Summary | |
---|---|
RuntimeElementInfoImpl.RuntimePropertyImpl()
|
Method Summary | |
---|---|
boolean |
elementOnlyContent()
Returns true if this property has an element-only content. |
Accessor |
getAccessor()
Gets the Accessor for this property. |
Type |
getIndividualType()
Gets the type of the individual item. |
Type |
getRawType()
Gets the "raw" type of the field. |
RuntimePropertyInfo |
getSource()
Gets the property which is the source of this reference. |
RuntimeNonElement |
getTarget()
Target of the reference. |
Transducer |
getTransducer()
If the XML representation of the referenced Java type is just a text, return a transducer that converts between the bean and XML. |
List<? extends RuntimeTypeRef> |
getTypes()
Returns the information about the types allowed in this property. |
List<? extends RuntimeNonElement> |
ref()
List of TypeInfo s that this property references. |
Methods inherited from class com.sun.xml.bind.v2.model.impl.ElementInfoImpl.PropertyImpl |
---|
displayName, getAdapter, getDefaultValue, getExpectedMimeType, getName, getSchemaType, getTagName, getXmlName, hasAnnotation, id, inlineBinaryData, isCollection, isCollectionNillable, isCollectionRequired, isNillable, isRequired, isValueList, kind, parent, readAnnotation |
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, isRequired, isValueList |
Methods inherited from interface com.sun.xml.bind.v2.model.core.PropertyInfo |
---|
displayName, getExpectedMimeType, getName, getSchemaType, id, inlineBinaryData, isCollection, kind, parent |
Methods inherited from interface com.sun.xml.bind.v2.model.annotation.AnnotationSource |
---|
hasAnnotation, readAnnotation |
Methods inherited from interface com.sun.xml.bind.v2.model.core.TypeRef |
---|
getDefaultValue, getTagName, isNillable |
Constructor Detail |
---|
RuntimeElementInfoImpl.RuntimePropertyImpl()
Method Detail |
---|
public Accessor getAccessor()
RuntimePropertyInfo
Accessor
for this property.
Even for a multi-value property, this method returns an accessor to that property. IOW, the accessor works against the raw type.
This methods returns unoptimized accessor (because optimization accessors are often combined into bigger pieces, and optimization generally works better if you can look at a bigger piece, as opposed to individually optimize a smaller components)
getAccessor
in interface RuntimePropertyInfo
Accessor#optimize()
public Type getRawType()
RuntimePropertyInfo
Collection<Integer>
,
this method returns Collection<Integer>
.
getRawType
in interface RuntimePropertyInfo
public Type getIndividualType()
RuntimePropertyInfo
RuntimePropertyInfo.getRawType()
.
For acollection property, this is the type used to store individual value.
So if RuntimePropertyInfo.getRawType()
is Collection<Integer>
, this method will
return Integer
.
getIndividualType
in interface RuntimePropertyInfo
public boolean elementOnlyContent()
RuntimePropertyInfo
elementOnlyContent
in interface RuntimePropertyInfo
public List<? extends RuntimeTypeRef> 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<Type,Class>
getTypes
in interface RuntimeElementPropertyInfo
getTypes
in class ElementInfoImpl.PropertyImpl
ElementPropertyInfo.isValueList()
==true, there's always exactly one type.public List<? extends RuntimeNonElement> 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<Type,Class>
ref
in interface RuntimeElementPropertyInfo
ref
in interface RuntimePropertyInfo
ref
in class ElementInfoImpl.PropertyImpl
public RuntimeNonElement getTarget()
NonElementRef
getTarget
in interface NonElementRef<Type,Class>
getTarget
in interface RuntimeNonElementRef
getTarget
in interface RuntimeTypeRef
getTarget
in class ElementInfoImpl.PropertyImpl
public RuntimePropertyInfo getSource()
NonElementRef
getSource
in interface NonElementRef<Type,Class>
getSource
in interface RuntimeNonElementRef
getSource
in interface RuntimeTypeRef
getSource
in class ElementInfoImpl.PropertyImpl
public Transducer getTransducer()
RuntimeNonElementRef
getTransducer
in interface RuntimeNonElementRef
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |