Module com.sun.xml.bind
Class ClassInfoImpl<T,C,F,M>
- java.lang.Object
-
- org.glassfish.jaxb.runtime.v2.model.impl.ClassInfoImpl<T,C,F,M>
-
- All Implemented Interfaces:
Locatable,ClassInfo<T,C>,Element<T,C>,MaybeElement<T,C>,NonElement<T,C>,TypeInfo<T,C>
public class ClassInfoImpl<T,C,F,M> extends Object implements ClassInfo<T,C>, Element<T,C>
A part of theClassInfothat doesn't depend on a particular reflection library.- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
-
Field Summary
Fields Modifier and Type Field Description protected org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M>attributeWildcardIf this class has a declared (not inherited) attribute wildcard, keep the reference to it.protected ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT>builderReference to theModelBuilder, only until we linkTypeInfos all together, because we don't want to keepModelBuildertoo long.protected Cclazzprotected org.glassfish.jaxb.runtime.v2.model.impl.TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT>ownerTypeInfoSetto which this class belongs.-
Fields inherited from interface org.glassfish.jaxb.core.v2.model.core.NonElement
ANYTYPE_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Element<T,C>asElement()booleancanBeReferencedByIDREF()AClassInfocan be referenced byXmlIDREFif it has an ID property.protected voidcheckFieldXmlLocation(F f)This hook is used byRuntimeClassInfoImplto look forXmlLocation.protected org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M>createAccessorSeed(M getter, M setter)Creates a newGetterSetterPropertySeedobject.protected org.glassfish.jaxb.runtime.v2.model.impl.AttributePropertyInfoImpl<T,C,F,M>createAttributeProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)protected org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl<T,C,F,M>createElementProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)protected org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M>createFieldSeed(F f)Creates a newFieldPropertySeedobject.protected org.glassfish.jaxb.runtime.v2.model.impl.MapPropertyInfoImpl<T,C,F,M>createMapProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)protected org.glassfish.jaxb.runtime.v2.model.impl.ReferencePropertyInfoImpl<T,C,F,M>createReferenceProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)protected org.glassfish.jaxb.runtime.v2.model.impl.ValuePropertyInfoImpl<T,C,F,M>createValueProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)booleandeclaresAttributeWildcard()ClassInfoImpl<T,C,F,M>getBaseClass()CgetClazz()QNamegetElementName()MethodgetFactoryMethod()LocationgetLocation()StringgetName()List<? extends PropertyInfo<T,C>>getProperties()PropertyInfo<T,C>getProperty(String name)ClassInfoImpl<T,C,F,M>getScope()Deprecated.you shouldn't be invoking this method onClassInfoImpl.Element<T,C>getSubstitutionHead()The substitution hierarchy is the same as the inheritance hierarchy.TgetType()QNamegetTypeName()LocatablegetUpstream()booleanhasAttributeWildcard()booleanhasProperties()booleanhasSubClasses()booleanhasValueProperty()booleaninheritsAttributeWildcard()booleanisAbstract()booleanisElement()booleanisFinal()booleanisOrdered()booleanisSimpleType()protected Navigator<TypeT,ClassDeclT,FieldT,MethodT>nav()protected QNameparseElementName(ClassDeclT clazz)Parses anXmlRootElementannotation on a class and determine the element name.protected QNameparseTypeName(ClassDeclT clazz)protected QNameparseTypeName(ClassDeclT clazz, jakarta.xml.bind.annotation.XmlType t)Parses a (potentially-null)XmlTypeannotation on a class and determine the actual value.<A extends Annotation>
AreadAnnotation(Class<A> a)protected AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT>reader()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.annotation.Locatable
getUpstream
-
-
-
-
Field Detail
-
clazz
protected final C clazz
-
attributeWildcard
protected org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> attributeWildcard
If this class has a declared (not inherited) attribute wildcard, keep the reference to it. This parameter is initialized at the construction time and never change.
-
owner
protected final org.glassfish.jaxb.runtime.v2.model.impl.TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT> owner
TypeInfoSetto which this class belongs.
-
builder
protected ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder
Reference to theModelBuilder, only until we linkTypeInfos all together, because we don't want to keepModelBuildertoo long.
-
-
Method Detail
-
getBaseClass
public ClassInfoImpl<T,C,F,M> getBaseClass()
- Specified by:
getBaseClassin interfaceClassInfo<T,C>
-
getSubstitutionHead
public final Element<T,C> getSubstitutionHead()
The substitution hierarchy is the same as the inheritance hierarchy.- Specified by:
getSubstitutionHeadin interfaceElement<T,C>
-
getScope
public ClassInfoImpl<T,C,F,M> getScope()
Deprecated.you shouldn't be invoking this method onClassInfoImpl.When a bean binds to an element, it's always throughXmlRootElement, so this method always return null.
-
canBeReferencedByIDREF
public boolean canBeReferencedByIDREF()
AClassInfocan be referenced byXmlIDREFif it has an ID property.- Specified by:
canBeReferencedByIDREFin interfaceTypeInfo<T,C>
-
readAnnotation
public <A extends Annotation> A readAnnotation(Class<A> a)
-
getProperties
public List<? extends PropertyInfo<T,C>> getProperties()
- Specified by:
getPropertiesin interfaceClassInfo<T,C>
-
hasValueProperty
public final boolean hasValueProperty()
- Specified by:
hasValuePropertyin interfaceClassInfo<T,C>
-
getProperty
public PropertyInfo<T,C> getProperty(String name)
- Specified by:
getPropertyin interfaceClassInfo<T,C>
-
checkFieldXmlLocation
protected void checkFieldXmlLocation(F f)
This hook is used byRuntimeClassInfoImplto look forXmlLocation.
-
hasProperties
public boolean hasProperties()
- Specified by:
hasPropertiesin interfaceClassInfo<T,C>
-
createReferenceProperty
protected org.glassfish.jaxb.runtime.v2.model.impl.ReferencePropertyInfoImpl<T,C,F,M> createReferenceProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)
-
createAttributeProperty
protected org.glassfish.jaxb.runtime.v2.model.impl.AttributePropertyInfoImpl<T,C,F,M> createAttributeProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)
-
createValueProperty
protected org.glassfish.jaxb.runtime.v2.model.impl.ValuePropertyInfoImpl<T,C,F,M> createValueProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)
-
createElementProperty
protected org.glassfish.jaxb.runtime.v2.model.impl.ElementPropertyInfoImpl<T,C,F,M> createElementProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)
-
createMapProperty
protected org.glassfish.jaxb.runtime.v2.model.impl.MapPropertyInfoImpl<T,C,F,M> createMapProperty(org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> seed)
-
createFieldSeed
protected org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> createFieldSeed(F f)
Creates a newFieldPropertySeedobject.Derived class can override this method to create a sub-class.
-
createAccessorSeed
protected org.glassfish.jaxb.runtime.v2.model.impl.PropertySeed<T,C,F,M> createAccessorSeed(M getter, M setter)
Creates a newGetterSetterPropertySeedobject.
-
isElement
public final boolean isElement()
- Specified by:
isElementin interfaceMaybeElement<T,C>
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfaceClassInfo<T,C>
-
hasSubClasses
public final boolean hasSubClasses()
- Specified by:
hasSubClassesin interfaceClassInfo<T,C>
-
hasAttributeWildcard
public final boolean hasAttributeWildcard()
- Specified by:
hasAttributeWildcardin interfaceClassInfo<T,C>
-
inheritsAttributeWildcard
public final boolean inheritsAttributeWildcard()
- Specified by:
inheritsAttributeWildcardin interfaceClassInfo<T,C>
-
declaresAttributeWildcard
public final boolean declaresAttributeWildcard()
- Specified by:
declaresAttributeWildcardin interfaceClassInfo<T,C>
-
getElementName
public final QName getElementName()
- Specified by:
getElementNamein interfaceElement<T,C>- Specified by:
getElementNamein interfaceMaybeElement<T,C>
-
getTypeName
public final QName getTypeName()
- Specified by:
getTypeNamein interfaceNonElement<T,C>
-
isSimpleType
public final boolean isSimpleType()
- Specified by:
isSimpleTypein interfaceNonElement<T,C>
-
getLocation
public Location getLocation()
- Specified by:
getLocationin interfaceLocatable
-
getFactoryMethod
public Method getFactoryMethod()
-
getUpstream
public Locatable getUpstream()
- Specified by:
getUpstreamin interfaceLocatable
-
nav
protected final Navigator<TypeT,ClassDeclT,FieldT,MethodT> nav()
-
reader
protected final AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT> reader()
-
parseElementName
protected final QName parseElementName(ClassDeclT clazz)
Parses anXmlRootElementannotation on a class and determine the element name.- Returns:
- null if none was found.
-
parseTypeName
protected final QName parseTypeName(ClassDeclT clazz)
-
parseTypeName
protected final QName parseTypeName(ClassDeclT clazz, jakarta.xml.bind.annotation.XmlType t)
Parses a (potentially-null)XmlTypeannotation on a class and determine the actual value.- Parameters:
clazz- The class on which the XmlType annotation is checked.t- TheXmlTypeannotation on the clazz. This value is taken as a parameter to improve the performance for the case where 't' is pre-computed.
-
-