com.sun.xml.bind.v2.model.core
Interface PropertyInfo<T,C>

All Known Subinterfaces:
AttributePropertyInfo<T,C>, ElementPropertyInfo<T,C>, MapPropertyInfo<T,C>, ReferencePropertyInfo<T,C>, RuntimeAttributePropertyInfo, RuntimeElementPropertyInfo, RuntimeMapPropertyInfo, RuntimePropertyInfo, RuntimeReferencePropertyInfo, RuntimeValuePropertyInfo, ValuePropertyInfo<T,C>
All Known Implementing Classes:
AttributePropertyInfoImpl, ElementInfoImpl.PropertyImpl, ElementPropertyInfoImpl, ERPropertyInfoImpl, MapPropertyInfoImpl, PropertyInfoImpl, ReferencePropertyInfoImpl, RuntimeAttributePropertyInfoImpl, RuntimeElementInfoImpl.RuntimePropertyImpl, RuntimeElementPropertyInfoImpl, RuntimeMapPropertyInfoImpl, RuntimeReferencePropertyInfoImpl, RuntimeValuePropertyInfoImpl, SingleTypePropertyInfoImpl, ValuePropertyInfoImpl

public interface PropertyInfo<T,C>

Information about a JAXB-bound property.

All the JAXB annotations are already incorporated into the model so that the caller doesn't have to worry about reading them. For this reason, you cannot access annotations on properties directly. TODO: don't we need a visitor?


Method Summary
 java.lang.String displayName()
          Gets the display name of the property.
 Adapter<T,C> getAdapter()
           
 javax.activation.MimeType getExpectedMimeType()
          Expected MIME type, if any.
 java.lang.String getName()
          Gets the name of the property.
 javax.xml.namespace.QName getSchemaType()
          The effective value of XmlSchemaType annotation, if any.
 ID id()
          Returns the IDness of the value of this element.
 boolean inlineBinaryData()
          If this is true and this property indeed represents a binary data, it should be always inlined.
 boolean isCollection()
          Returns true if this is a multi-valued collection property.
 PropertyKind kind()
          Gets the kind of this proeprty.
 TypeInfo<T,C> parent()
          Gets the ClassInfo or ElementInfo to which this property belongs.
 java.util.Collection<? extends TypeInfo<T,C>> ref()
          List of TypeInfos that this property references.
 

Method Detail

parent

TypeInfo<T,C> parent()
Gets the ClassInfo or ElementInfo to which this property belongs.


getName

java.lang.String getName()
Gets the name of the property.

For example, "foo" or "bar". This doesn't directly affect XML. The property name uniquely identifies a property within a class.

See Also:
XmlType.propOrder()

displayName

java.lang.String displayName()
Gets the display name of the property.

This is a convenience method for parent().getName()+'#'+getName().


isCollection

boolean isCollection()
Returns true if this is a multi-valued collection property. Otherwise false, in which case the property is a single value.


ref

java.util.Collection<? extends TypeInfo<T,C>> 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.

Returns:
non-null read-only collection.

kind

PropertyKind kind()
Gets the kind of this proeprty.

Returns:
always non-null.

getAdapter

Adapter<T,C> getAdapter()
Returns:
null if the property is not adapted.

id

ID id()
Returns the IDness of the value of this element.

Returns:
always non-null
See Also:
XmlID, XmlIDREF

getExpectedMimeType

javax.activation.MimeType getExpectedMimeType()
Expected MIME type, if any.


inlineBinaryData

boolean inlineBinaryData()
If this is true and this property indeed represents a binary data, it should be always inlined.


getSchemaType

javax.xml.namespace.QName getSchemaType()
The effective value of XmlSchemaType annotation, if any.

Returns:
maye be null.