com.sun.xml.bind.v2.model.impl
Class RuntimeReferencePropertyInfoImpl
java.lang.Object
com.sun.xml.bind.v2.model.impl.PropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
com.sun.xml.bind.v2.model.impl.ERPropertyInfoImpl<T,C,F,M>
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl<Type,Class,Field,Method>
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl
- All Implemented Interfaces:
- AnnotationSource, Locatable, PropertyInfo<Type,Class>, ReferencePropertyInfo<Type,Class>, RuntimePropertyInfo, RuntimeReferencePropertyInfo, Comparable<PropertyInfoImpl>
class RuntimeReferencePropertyInfoImpl
- extends ReferencePropertyInfoImpl<Type,Class,Field,Method>
- implements RuntimeReferencePropertyInfo
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 |
RuntimeReferencePropertyInfoImpl
public RuntimeReferencePropertyInfoImpl(RuntimeClassInfoImpl classInfo,
PropertySeed<Type,Class,Field,Method> seed)
getElements
public Set<? extends RuntimeElement> getElements()
- Description copied from interface:
ReferencePropertyInfo
- Returns the information about the possible elements in this property.
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.
- Specified by:
getElements
in interface ReferencePropertyInfo<Type,Class>
- Specified by:
getElements
in interface RuntimeReferencePropertyInfo
- Overrides:
getElements
in class ReferencePropertyInfoImpl<Type,Class,Field,Method>
- Returns:
- Always non-null. Contains at least one entry.
ref
public Set<? extends RuntimeElement> ref()
- Description copied from interface:
ReferencePropertyInfo
- List of
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..
If this ReferencePropertyInfo
has a wildcard in it,
then the returned list will contain WildcardTypeInfo
.
- Specified by:
ref
in interface PropertyInfo<Type,Class>
- Specified by:
ref
in interface ReferencePropertyInfo<Type,Class>
- Specified by:
ref
in interface RuntimePropertyInfo
- Overrides:
ref
in class ReferencePropertyInfoImpl<Type,Class,Field,Method>
- Returns:
- non-null read-only collection.
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