|
||||||||||
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.TypeInfoImpl<T,C,F,M>
com.sun.xml.bind.v2.model.impl.ClassInfoImpl<T,C,F,M>
class ClassInfoImpl<T,C,F,M>
A part of the ClassInfo
that doesn't depend on a particular
reflection library.
Field Summary | |
---|---|
protected PropertySeed<T,C,F,M> |
attributeWildcard
If this class has a declared (not inherited) attribute wildcard, keep the reference to it. |
protected C |
clazz
|
Fields inherited from class com.sun.xml.bind.v2.model.impl.TypeInfoImpl |
---|
builder, owner |
Fields inherited from interface com.sun.xml.bind.v2.model.core.NonElement |
---|
ANYTYPE_NAME |
Constructor Summary | |
---|---|
ClassInfoImpl(ModelBuilder<T,C,F,M> builder,
Locatable upstream,
C clazz)
|
Method Summary | ||
---|---|---|
Element<T,C> |
asElement()
Returns the Element aspect of this ClassInfo . |
|
boolean |
canBeReferencedByIDREF()
A ClassInfo can be referenced by XmlIDREF if
it has an ID property. |
|
protected void |
checkFieldXmlLocation(F f)
This hook is used by RuntimeClassInfoImpl to look for XmlLocation . |
|
protected PropertySeed<T,C,F,M> |
createAccessorSeed(M getter,
M setter)
Creates a new GetterSetterPropertySeed object. |
|
protected AttributePropertyInfoImpl<T,C,F,M> |
createAttributeProperty(PropertySeed<T,C,F,M> seed)
|
|
protected ElementPropertyInfoImpl<T,C,F,M> |
createElementProperty(PropertySeed<T,C,F,M> seed)
|
|
protected PropertySeed<T,C,F,M> |
createFieldSeed(F f)
Creates a new FieldPropertySeed object. |
|
protected MapPropertyInfoImpl<T,C,F,M> |
createMapProperty(PropertySeed<T,C,F,M> seed)
|
|
protected ReferencePropertyInfoImpl<T,C,F,M> |
createReferenceProperty(PropertySeed<T,C,F,M> seed)
|
|
protected ValuePropertyInfoImpl<T,C,F,M> |
createValueProperty(PropertySeed<T,C,F,M> seed)
|
|
boolean |
declaresAttributeWildcard()
Returns true iff this class declares a wildcard attribute. |
|
ClassInfoImpl<T,C,F,M> |
getBaseClass()
Obtains the information about the base class. |
|
C |
getClazz()
Gets the declaration this object is wrapping. |
|
QName |
getElementName()
Gets the element name of the class, if the class is bound to an element. |
|
Method |
getFactoryMethod()
|
|
Location |
getLocation()
Gets the location object that this object points to. |
|
String |
getName()
Gets the fully-qualified name of the class. |
|
List<? extends PropertyInfo<T,C>> |
getProperties()
Returns all the properties newly declared in this class. |
|
PropertyInfo<T,C> |
getProperty(String name)
Gets the property that has the specified name. |
|
ClassInfoImpl<T,C,F,M> |
getScope()
Deprecated. you shouldn't be invoking this method on ClassInfoImpl . |
|
Element<T,C> |
getSubstitutionHead()
If this element can substitute another element, return that element. |
|
T |
getType()
Gets the underlying Java type that object represents. |
|
QName |
getTypeName()
Gets the primary XML type ANYTYPE_NAME of the class. |
|
boolean |
hasAttributeWildcard()
Returns true if this bean class has an attribute wildcard. |
|
boolean |
hasProperties()
If the class has properties, return true. |
|
boolean |
hasSubClasses()
True if there's a known sub-type of this class in TypeInfoSet . |
|
boolean |
hasValueProperty()
Returns true if this class or its ancestor has XmlValue
property. |
|
boolean |
inheritsAttributeWildcard()
Returns true iff this class inherits a wildcard attribute from its ancestor classes. |
|
boolean |
isAbstract()
If this class is abstract and thus shall never be directly instanciated. |
|
boolean |
isElement()
If the class is bound to an element, return true. |
|
boolean |
isFinal()
If this class is marked as final and no further extension/restriction is allowed. |
|
boolean |
isOrdered()
Returns true if the properties of this class is ordered in XML. |
|
boolean |
isSimpleType()
Returns true if this NonElement maps to text in XML,
without any attribute nor child elements. |
|
(package private) void |
link()
Called after all the TypeInfo s are collected into the TypeInfoImpl.owner . |
|
|
readAnnotation(Class<A> a)
|
|
String |
toString()
|
Methods inherited from class com.sun.xml.bind.v2.model.impl.TypeInfoImpl |
---|
getUpstream, nav, parseElementName, parseTypeName, parseTypeName, reader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.sun.xml.bind.v2.model.annotation.Locatable |
---|
getUpstream |
Field Detail |
---|
protected final C clazz
protected PropertySeed<T,C,F,M> attributeWildcard
Constructor Detail |
---|
ClassInfoImpl(ModelBuilder<T,C,F,M> builder, Locatable upstream, C clazz)
Method Detail |
---|
public ClassInfoImpl<T,C,F,M> getBaseClass()
ClassInfo
getBaseClass
in interface ClassInfo<T,C>
Object
.public final Element<T,C> getSubstitutionHead()
Substitutability of elements are transitive. The substitution hierarchy is the same as the inheritance hierarchy.
getSubstitutionHead
in interface Element<T,C>
public final C getClazz()
ClassInfo
getClazz
in interface ClassInfo<T,C>
public ClassInfoImpl<T,C,F,M> getScope()
ClassInfoImpl
.
XmlRootElement
,
so this method always return null.
getScope
in interface Element<T,C>
public final T getType()
TypeInfo
getType
in interface TypeInfo<T,C>
public boolean canBeReferencedByIDREF()
ClassInfo
can be referenced by XmlIDREF
if
it has an ID property.
canBeReferencedByIDREF
in interface TypeInfo<T,C>
public final String getName()
ClassInfo
getName
in interface ClassInfo<T,C>
public <A extends Annotation> A readAnnotation(Class<A> a)
public Element<T,C> asElement()
MaybeElement
Element
aspect of this ClassInfo
.
asElement
in interface MaybeElement<T,C>
MaybeElement.isElement()
==false, non-null if MaybeElement.isElement()
==true.public List<? extends PropertyInfo<T,C>> getProperties()
ClassInfo
This excludes properties defined in the super class.
If the properties are ordered
,
it will be returned in the order that appear in XML.
Otherwise it will be returned in no particular order.
Properties marked with XmlTransient
will not show up
in this list. As far as JAXB is concerned, they are considered
non-existent.
getProperties
in interface ClassInfo<T,C>
public final boolean hasValueProperty()
ClassInfo
XmlValue
property.
hasValueProperty
in interface ClassInfo<T,C>
public PropertyInfo<T,C> getProperty(String name)
ClassInfo
This is just a convenience method for:
for( PropertyInfo p : getProperties() ) { if(p.getName().equals(name)) return p; } return null;
getProperty
in interface ClassInfo<T,C>
PropertyInfo.getName()
protected void checkFieldXmlLocation(F f)
RuntimeClassInfoImpl
to look for XmlLocation
.
public boolean hasProperties()
ClassInfo
ClassInfo.getProperties()
is not empty.
hasProperties
in interface ClassInfo<T,C>
protected ReferencePropertyInfoImpl<T,C,F,M> createReferenceProperty(PropertySeed<T,C,F,M> seed)
protected AttributePropertyInfoImpl<T,C,F,M> createAttributeProperty(PropertySeed<T,C,F,M> seed)
protected ValuePropertyInfoImpl<T,C,F,M> createValueProperty(PropertySeed<T,C,F,M> seed)
protected ElementPropertyInfoImpl<T,C,F,M> createElementProperty(PropertySeed<T,C,F,M> seed)
protected MapPropertyInfoImpl<T,C,F,M> createMapProperty(PropertySeed<T,C,F,M> seed)
protected PropertySeed<T,C,F,M> createFieldSeed(F f)
FieldPropertySeed
object.
Derived class can override this method to create a sub-class.
protected PropertySeed<T,C,F,M> createAccessorSeed(M getter, M setter)
GetterSetterPropertySeed
object.
public final boolean isElement()
MaybeElement
Note that when this is true, the class is bound to both an element and a type.
isElement
in interface MaybeElement<T,C>
public boolean isAbstract()
ClassInfo
isAbstract
in interface ClassInfo<T,C>
public boolean isOrdered()
ClassInfo
In RELAX NG context, ordered properties mean <group> and unordered properties mean <interleave>.
isOrdered
in interface ClassInfo<T,C>
public final boolean isFinal()
ClassInfo
isFinal
in interface ClassInfo<T,C>
public final boolean hasSubClasses()
ClassInfo
TypeInfoSet
.
hasSubClasses
in interface ClassInfo<T,C>
public final boolean hasAttributeWildcard()
ClassInfo
This is true if the class declares an attribute wildcard, or it is inherited from its super classes.
hasAttributeWildcard
in interface ClassInfo<T,C>
ClassInfo.inheritsAttributeWildcard()
public final boolean inheritsAttributeWildcard()
ClassInfo
inheritsAttributeWildcard
in interface ClassInfo<T,C>
public final boolean declaresAttributeWildcard()
ClassInfo
declaresAttributeWildcard
in interface ClassInfo<T,C>
public final QName getElementName()
MaybeElement
getElementName
in interface Element<T,C>
getElementName
in interface MaybeElement<T,C>
MaybeElement.isElement()
.public final QName getTypeName()
NonElement
A Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.
getTypeName
in interface NonElement<T,C>
public final boolean isSimpleType()
NonElement
NonElement
maps to text in XML,
without any attribute nor child elements.
isSimpleType
in interface NonElement<T,C>
void link()
TypeInfo
s are collected into the TypeInfoImpl.owner
.
link
in class TypeInfoImpl<T,C,F,M>
public Location getLocation()
Locatable
getLocation
in interface Locatable
public Method getFactoryMethod()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |