|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.model.impl.PropertyInfoImpl<T,C,F,M>
abstract class PropertyInfoImpl<T,C,F,M>
Default partial implementation for PropertyInfo
.
Field Summary | |
---|---|
protected ClassInfoImpl<T,C,F,M> |
parent
|
protected PropertySeed<T,C,F,M> |
seed
Object that reads annotations. |
Constructor Summary | |
---|---|
protected |
PropertyInfoImpl(ClassInfoImpl<T,C,F,M> parent,
PropertySeed<T,C,F,M> spi)
|
Method Summary | ||
---|---|---|
protected QName |
calcXmlName(XmlElement e)
Computes the tag name from a XmlElement by taking the defaulting into account. |
|
protected QName |
calcXmlName(XmlElementWrapper e)
Computes the tag name from a XmlElementWrapper by taking the defaulting into account. |
|
int |
compareTo(PropertyInfoImpl that)
|
|
String |
displayName()
Gets the display name of the property. |
|
Adapter<T,C> |
getAdapter()
This is the default implementation of the getAdapter method defined on many of the PropertyInfo -derived classes. |
|
javax.activation.MimeType |
getExpectedMimeType()
Expected MIME type, if any. |
|
T |
getIndividualType()
|
|
Location |
getLocation()
Gets the location object that this object points to. |
|
String |
getName()
Gets the name of the property. |
|
T |
getRawType()
|
|
QName |
getSchemaType()
The effective value of XmlSchemaType annotation, if any. |
|
Locatable |
getUpstream()
A PropertyInfoImpl is always referenced by its enclosing class,
so return that as the upstream. |
|
boolean |
hasAnnotation(Class<? extends Annotation> annotationType)
Returns true if the property has the specified annotation. |
|
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. |
|
protected void |
link()
Called after all the TypeInfo s are collected into the governing TypeInfoSet . |
|
protected Navigator<T,C,F,M> |
nav()
|
|
ClassInfoImpl<T,C,F,M> |
parent()
Gets the ClassInfo or ElementInfo to which this property belongs. |
|
|
readAnnotation(Class<A> annotationType)
Gets the value of the specified annotation from the given property. |
|
protected AnnotationReader<T,C,F,M> |
reader()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.xml.bind.v2.model.core.PropertyInfo |
---|
kind, ref |
Field Detail |
---|
protected final PropertySeed<T,C,F,M> seed
protected final ClassInfoImpl<T,C,F,M> parent
Constructor Detail |
---|
protected PropertyInfoImpl(ClassInfoImpl<T,C,F,M> parent, PropertySeed<T,C,F,M> spi)
Method Detail |
---|
public ClassInfoImpl<T,C,F,M> parent()
PropertyInfo
ClassInfo
or ElementInfo
to which this property belongs.
parent
in interface PropertyInfo<T,C>
protected final Navigator<T,C,F,M> nav()
protected final AnnotationReader<T,C,F,M> reader()
public T getRawType()
public T getIndividualType()
public final String getName()
PropertyInfo
For example, "foo" or "bar". Generally, a property name is different from XML, (although they are often related, as a property name is often computed from tag names / attribute names.) In fact, property names do not directly affect XML. The property name uniquely identifies a property within a class.
getName
in interface PropertyInfo<T,C>
XmlType.propOrder()
public Adapter<T,C> getAdapter()
PropertyInfo
-derived classes.
getAdapter
in interface PropertyInfo<T,C>
public final String displayName()
PropertyInfo
This is a convenience method for
parent().getName()+'#'+getName()
.
displayName
in interface PropertyInfo<T,C>
public final ID id()
PropertyInfo
id
in interface PropertyInfo<T,C>
XmlID
,
XmlIDREF
public final javax.activation.MimeType getExpectedMimeType()
PropertyInfo
getExpectedMimeType
in interface PropertyInfo<T,C>
public final boolean inlineBinaryData()
PropertyInfo
inlineBinaryData
in interface PropertyInfo<T,C>
public final QName getSchemaType()
PropertyInfo
XmlSchemaType
annotation, if any.
If the property doesn't have XmlSchemaType
annotation,
this method returns null.
Since a type name is a property of a Java type, not a Java property,
A schema type name of a Java type should be primarily obtained
by using NonElement.getTypeName()
. This method is to correctly
implement the ugly semantics of XmlSchemaType
(namely
when this returns non-null, it overrides the type names of all types
that are in this property.)
getSchemaType
in interface PropertyInfo<T,C>
public final boolean isCollection()
PropertyInfo
isCollection
in interface PropertyInfo<T,C>
protected void link()
TypeInfo
s are collected into the governing TypeInfoSet
.
Derived class can do additional actions to complete the model.
public Locatable getUpstream()
PropertyInfoImpl
is always referenced by its enclosing class,
so return that as the upstream.
getUpstream
in interface Locatable
public Location getLocation()
Locatable
getLocation
in interface Locatable
protected final QName calcXmlName(XmlElement e)
XmlElement
by taking the defaulting into account.
protected final QName calcXmlName(XmlElementWrapper e)
XmlElementWrapper
by taking the defaulting into account.
public int compareTo(PropertyInfoImpl that)
compareTo
in interface Comparable<PropertyInfoImpl>
public final <A extends Annotation> A readAnnotation(Class<A> annotationType)
AnnotationSource
When this method is used for a property that consists of a getter and setter, it returns the annotation on either of those methods. If both methods have the same annotation, it is an error.
readAnnotation
in interface AnnotationSource
public final boolean hasAnnotation(Class<? extends Annotation> annotationType)
AnnotationSource
Short for readAnnotation(annotationType)!=null
,
but this method is typically faster.
hasAnnotation
in interface AnnotationSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |