public interface PropertyInfo<T,C> extends AnnotationSource
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?
Modifier and Type | Method and Description |
---|---|
String |
displayName()
Gets the display name of the property.
|
Adapter<T,C> |
getAdapter() |
MimeType |
getExpectedMimeType()
Expected MIME type, if any.
|
String |
getName()
Gets the name of the property.
|
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 property.
|
TypeInfo<T,C> |
parent()
Gets the
ClassInfo or ElementInfo to which this property belongs. |
Collection<? extends TypeInfo<T,C>> |
ref()
List of
TypeInfo s that this property references. |
hasAnnotation, readAnnotation
TypeInfo<T,C> parent()
ClassInfo
or ElementInfo
to which this property belongs.String getName()
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.
XmlType.propOrder()
String displayName()
This is a convenience method for
parent().getName()+'#'+getName()
.
boolean isCollection()
Collection<? extends TypeInfo<T,C>> ref()
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.PropertyKind kind()
ID id()
MimeType getExpectedMimeType()
boolean inlineBinaryData()
@Nullable QName getSchemaType()
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.)
Copyright © 2021 JBoss by Red Hat. All rights reserved.