AnnotationSource, ElementPropertyInfo<java.lang.reflect.Type,java.lang.Class>, PropertyInfo<java.lang.reflect.Type,java.lang.Class>, RuntimePropertyInfopublic interface RuntimeElementPropertyInfo extends ElementPropertyInfo<java.lang.reflect.Type,java.lang.Class>, RuntimePropertyInfo
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<? extends RuntimeTypeRef> |
getTypes() |
Returns the information about the types allowed in this property.
|
java.util.Collection<? extends RuntimeTypeInfo> |
ref() |
List of
TypeInfos that this property references. |
hasAnnotation, readAnnotationgetAdapter, getXmlName, isCollectionNillable, isCollectionRequired, isRequired, isValueListdisplayName, getExpectedMimeType, getName, getSchemaType, id, inlineBinaryData, isCollection, kind, parentelementOnlyContent, getAccessor, getIndividualType, getRawTypejava.util.Collection<? extends RuntimeTypeInfo> ref()
TypeInfos 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<java.lang.reflect.Type,java.lang.Class>ref in interface RuntimePropertyInfojava.util.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 TypeRefs.
getTypes in interface ElementPropertyInfo<java.lang.reflect.Type,java.lang.Class>ElementPropertyInfo.isValueList()==true, there's always exactly one type.Copyright © 2018 Oracle Corporation. All rights reserved.