com.sun.xml.bind.v2.model.impl
Class RuntimeElementPropertyInfoImpl
java.lang.Object
com.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<java.lang.reflect.Type,java.lang.Class,java.lang.reflect.Field,java.lang.reflect.Method>
com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl
- All Implemented Interfaces:
- AnnotationSource, Locatable, ElementPropertyInfo<java.lang.reflect.Type,java.lang.Class>, PropertyInfo<java.lang.reflect.Type,java.lang.Class>, RuntimeElementPropertyInfo, RuntimePropertyInfo, java.lang.Comparable<PropertyInfoImpl>
class RuntimeElementPropertyInfoImpl
- extends ElementPropertyInfoImpl<java.lang.reflect.Type,java.lang.Class,java.lang.reflect.Field,java.lang.reflect.Method>
- implements RuntimeElementPropertyInfo
| 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 |
RuntimeElementPropertyInfoImpl
RuntimeElementPropertyInfoImpl(RuntimeClassInfoImpl classInfo,
PropertySeed<java.lang.reflect.Type,java.lang.Class,java.lang.reflect.Field,java.lang.reflect.Method> seed)
getAccessor
public Accessor getAccessor()
- Description copied from interface:
RuntimePropertyInfo
- Gets the
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)
- Specified by:
getAccessor in interface RuntimePropertyInfo
- Returns:
- never null.
- See Also:
Accessor#optimize()
elementOnlyContent
public boolean elementOnlyContent()
- Description copied from interface:
RuntimePropertyInfo
- Returns true if this property has an element-only content. False otherwise.
- Specified by:
elementOnlyContent in interface RuntimePropertyInfo
ref
public java.util.List<? extends RuntimeTypeInfo> ref()
- Description copied from interface:
PropertyInfo
- List of
TypeInfos 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:
ref in interface PropertyInfo<java.lang.reflect.Type,java.lang.Class>- Specified by:
ref in interface RuntimeElementPropertyInfo- Specified by:
ref in interface RuntimePropertyInfo- Overrides:
ref in class ElementPropertyInfoImpl<java.lang.reflect.Type,java.lang.Class,java.lang.reflect.Field,java.lang.reflect.Method>
- Returns:
- non-null read-only collection.
createTypeRef
protected RuntimeTypeRefImpl createTypeRef(javax.xml.namespace.QName name,
java.lang.reflect.Type type,
boolean isNillable,
java.lang.String defaultValue)
- Description copied from class:
ElementPropertyInfoImpl
- Used by
PropertyInfoImpl to create new instances of TypeRef
- Overrides:
createTypeRef in class ElementPropertyInfoImpl<java.lang.reflect.Type,java.lang.Class,java.lang.reflect.Field,java.lang.reflect.Method>
getTypes
public java.util.List<RuntimeTypeRefImpl> getTypes()
- Description copied from interface:
ElementPropertyInfo
- Returns the information about the types allowed in this property.
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 TypeRefs.
- Specified by:
getTypes in interface ElementPropertyInfo<java.lang.reflect.Type,java.lang.Class>- Specified by:
getTypes in interface RuntimeElementPropertyInfo- Overrides:
getTypes in class ElementPropertyInfoImpl<java.lang.reflect.Type,java.lang.Class,java.lang.reflect.Field,java.lang.reflect.Method>
- Returns:
- Always non-null. Contains at least one entry.
If
ElementPropertyInfo.isValueList()==true, there's always exactly one type.