public class ClassInfoImpl<T,C,F,M> extends Object implements ClassInfo<T,C>, Element<T,C>
ClassInfo that doesn't depend on a particular
reflection library.| Modifier and Type | Field and Description |
|---|---|
protected com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> |
attributeWildcard
If this class has a declared (not inherited) attribute wildcard, keep the reference
to it.
|
protected ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> |
builder
Reference to the
ModelBuilder, only until we link TypeInfos all together,
because we don't want to keep ModelBuilder too long. |
protected C |
clazz |
protected com.sun.xml.bind.v2.model.impl.TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT> |
owner
TypeInfoSet to which this class belongs. |
ANYTYPE_NAME| Modifier and Type | Method and Description |
|---|---|
Element<T,C> |
asElement()
|
boolean |
canBeReferencedByIDREF()
|
protected void |
checkFieldXmlLocation(F f)
This hook is used by
RuntimeClassInfoImpl to look for XmlLocation. |
protected com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> |
createAccessorSeed(M getter,
M setter)
Creates a new
GetterSetterPropertySeed object. |
protected com.sun.xml.bind.v2.model.impl.AttributePropertyInfoImpl<T,C,F,M> |
createAttributeProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed) |
protected com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl<T,C,F,M> |
createElementProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed) |
protected com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> |
createFieldSeed(F f)
Creates a new
FieldPropertySeed object. |
protected com.sun.xml.bind.v2.model.impl.MapPropertyInfoImpl<T,C,F,M> |
createMapProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed) |
protected com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl<T,C,F,M> |
createReferenceProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed) |
protected com.sun.xml.bind.v2.model.impl.ValuePropertyInfoImpl<T,C,F,M> |
createValueProperty(com.sun.xml.bind.v2.model.impl.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.
|
Locatable |
getUpstream()
Gets the upstream
Location information. |
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. |
protected Navigator<TypeT,ClassDeclT,FieldT,MethodT> |
nav() |
protected QName |
parseElementName(ClassDeclT clazz)
Parses an
XmlRootElement annotation on a class
and determine the element name. |
protected QName |
parseTypeName(ClassDeclT clazz) |
protected QName |
parseTypeName(ClassDeclT clazz,
XmlType t)
Parses a (potentially-null)
XmlType annotation on a class
and determine the actual value. |
<A extends Annotation> |
readAnnotation(Class<A> a) |
protected AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT> |
reader() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUpstreamprotected final C clazz
protected com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> attributeWildcard
protected final com.sun.xml.bind.v2.model.impl.TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT> owner
TypeInfoSet to which this class belongs.protected ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder
ModelBuilder, only until we link TypeInfos all together,
because we don't want to keep ModelBuilder too long.public ClassInfoImpl<T,C,F,M> getBaseClass()
ClassInfogetBaseClass 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()
ClassInfopublic ClassInfoImpl<T,C,F,M> getScope()
ClassInfoImpl.XmlRootElement,
so this method always return null.public final T getType()
TypeInfopublic boolean canBeReferencedByIDREF()
canBeReferencedByIDREF in interface TypeInfo<T,C>public final String getName()
ClassInfopublic <A extends Annotation> A readAnnotation(Class<A> a)
public Element<T,C> asElement()
MaybeElementasElement in interface MaybeElement<T,C>MaybeElement.isElement()==false, non-null if MaybeElement.isElement()==true.public List<? extends PropertyInfo<T,C>> getProperties()
ClassInfoThis 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()
ClassInfoXmlValue
property.hasValueProperty in interface ClassInfo<T,C>public PropertyInfo<T,C> getProperty(String name)
ClassInfoThis 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()
ClassInfoClassInfo.getProperties()
is not empty.hasProperties in interface ClassInfo<T,C>protected com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl<T,C,F,M> createReferenceProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed)
protected com.sun.xml.bind.v2.model.impl.AttributePropertyInfoImpl<T,C,F,M> createAttributeProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed)
protected com.sun.xml.bind.v2.model.impl.ValuePropertyInfoImpl<T,C,F,M> createValueProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed)
protected com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl<T,C,F,M> createElementProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed)
protected com.sun.xml.bind.v2.model.impl.MapPropertyInfoImpl<T,C,F,M> createMapProperty(com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> seed)
protected com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> createFieldSeed(F f)
FieldPropertySeed object.
Derived class can override this method to create a sub-class.
protected com.sun.xml.bind.v2.model.impl.PropertySeed<T,C,F,M> createAccessorSeed(M getter, M setter)
GetterSetterPropertySeed object.public final boolean isElement()
MaybeElementNote 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()
ClassInfoisAbstract in interface ClassInfo<T,C>public boolean isOrdered()
ClassInfo
In RELAX NG context, ordered properties mean <group> and
unordered properties mean <interleave>.
public final boolean isFinal()
ClassInfopublic final boolean hasSubClasses()
ClassInfoTypeInfoSet.hasSubClasses in interface ClassInfo<T,C>public final boolean hasAttributeWildcard()
ClassInfoThis 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()
ClassInfoinheritsAttributeWildcard in interface ClassInfo<T,C>public final boolean declaresAttributeWildcard()
ClassInfodeclaresAttributeWildcard in interface ClassInfo<T,C>public final QName getElementName()
MaybeElementgetElementName in interface Element<T,C>getElementName in interface MaybeElement<T,C>MaybeElement.isElement().public final QName getTypeName()
NonElementA 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()
NonElementNonElement maps to text in XML,
without any attribute nor child elements.isSimpleType in interface NonElement<T,C>public Location getLocation()
LocatablegetLocation in interface Locatablepublic Method getFactoryMethod()
public Locatable getUpstream()
LocatableLocation information.getUpstream in interface Locatableprotected final Navigator<TypeT,ClassDeclT,FieldT,MethodT> nav()
protected final AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT> reader()
protected final QName parseElementName(ClassDeclT clazz)
XmlRootElement annotation on a class
and determine the element name.protected final QName parseTypeName(ClassDeclT clazz)
protected final QName parseTypeName(ClassDeclT clazz, XmlType t)
XmlType annotation on a class
and determine the actual value.clazz - The class on which the XmlType annotation is checked.t - The XmlType annotation on the clazz. This value
is taken as a parameter to improve the performance for the case where
't' is pre-computed.Copyright © 2018 JBoss by Red Hat. All rights reserved.