Top Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.model.impl

pack-priv Class RuntimeElementPropertyInfoImpl

extends ElementPropertyInfoImpl<Type, Class<T>, Field, Method>
implements RuntimeElementPropertyInfo
Class Inheritance
All Implemented Interfaces
org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElementPropertyInfo, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo, org.glassfish.jaxb.core.v2.model.core.PropertyInfo, org.glassfish.jaxb.core.v2.model.annotation.AnnotationSource, org.glassfish.jaxb.core.v2.model.core.ElementPropertyInfo
Imports
org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElementPropertyInfo, .RuntimeTypeInfo, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, javax.xml.namespace.QName, java.lang.reflect.Field, .Method, .Type, java.util.List

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final Accessor<BeanT, ValueT>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected RuntimeTypeRefImpl
createTypeRef(QName name, Type type, boolean isNillable, String defaultValue)

Overrides org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl.createTypeRef.

Used by PropertyInfoImpl to create new instances of TypeRef

public boolean
elementOnlyContent()

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo.elementOnlyContent.

Returns true if this property has an element-only content.

public Accessor<BeanT, ValueT>
public List<RuntimeTypeRefImpl>
public List<? extends RuntimeTypeInfo>
Inherited from org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl:
isRequiredisValueListkindlink

Field Detail

accback to summary
private final Accessor<BeanT, ValueT> acc

Constructor Detail

RuntimeElementPropertyInfoImplback to summary
pack-priv RuntimeElementPropertyInfoImpl(RuntimeClassInfoImpl classInfo, PropertySeed<Type, Class<T>, Field, Method> seed)

Method Detail

createTypeRefback to summary
protected RuntimeTypeRefImpl createTypeRef(QName name, Type type, boolean isNillable, String defaultValue)

Overrides org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl.createTypeRef.

Doc from org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl.createTypeRef.

Used by PropertyInfoImpl to create new instances of TypeRef

Annotations
@Override
elementOnlyContentback to summary
public boolean elementOnlyContent()

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo.elementOnlyContent.

Doc from org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo.elementOnlyContent.

Returns true if this property has an element-only content. False otherwise.

Annotations
@Override
getAccessorback to summary
public Accessor<BeanT, ValueT> getAccessor()

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo.getAccessor.

Doc from org.glassfish.jaxb.runtime.v2.model.runtime.RuntimePropertyInfo.getAccessor.

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)

Annotations
@Override
getTypesback to summary
public List<RuntimeTypeRefImpl> getTypes()

Overrides org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl.getTypes.

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElementPropertyInfo.getTypes, org.glassfish.jaxb.core.v2.model.core.ElementPropertyInfo.getTypes.

Doc from org.glassfish.jaxb.core.v2.model.core.ElementPropertyInfo.getTypes.

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.

Annotations
@Override
refback to summary
public List<? extends RuntimeTypeInfo> ref()

Overrides org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl.ref.

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElementPropertyInfo.ref, org.glassfish.jaxb.core.v2.model.core.PropertyInfo.ref.

Doc from org.glassfish.jaxb.core.v2.model.core.PropertyInfo.ref.

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.

Annotations
@Override