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:
org.glassfish.jaxb.core.v2.model.annotation.Locatable,org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,C>,org.glassfish.jaxb.core.v2.model.core.Element<T,C>,org.glassfish.jaxb.core.v2.model.core.MaybeElement<T,C>,org.glassfish.jaxb.core.v2.model.core.NonElement<T,C>,org.glassfish.jaxb.core.v2.model.core.TypeInfo<T,C>
public class ClassInfoImpl<T,C,F,M> extends Object implements org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,C>, org.glassfish.jaxb.core.v2.model.core.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 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.glassfish.jaxb.core.v2.model.core.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 PropertySeed<T,C,F,M>createAccessorSeed(M getter, M setter)Creates a newGetterSetterPropertySeedobject.protected org.glassfish.jaxb.core.v2.model.core.AttributePropertyInfo<T,C>createAttributeProperty(PropertySeed<T,C,F,M> seed)protected org.glassfish.jaxb.core.v2.model.core.ElementPropertyInfo<T,C>createElementProperty(PropertySeed<T,C,F,M> seed)protected PropertySeed<T,C,F,M>createFieldSeed(F f)Creates a newFieldPropertySeedobject.protected org.glassfish.jaxb.core.v2.model.core.MapPropertyInfo<T,C>createMapProperty(PropertySeed<T,C,F,M> seed)protected org.glassfish.jaxb.core.v2.model.core.ReferencePropertyInfo<T,C>createReferenceProperty(PropertySeed<T,C,F,M> seed)protected org.glassfish.jaxb.core.v2.model.core.ValuePropertyInfo<T,C>createValueProperty(PropertySeed<T,C,F,M> seed)booleandeclaresAttributeWildcard()ClassInfoImpl<T,C,F,M>getBaseClass()CgetClazz()QNamegetElementName()MethodgetFactoryMethod()org.glassfish.jaxb.core.v2.runtime.LocationgetLocation()StringgetName()List<? extends org.glassfish.jaxb.core.v2.model.core.PropertyInfo<T,C>>getProperties()org.glassfish.jaxb.core.v2.model.core.PropertyInfo<T,C>getProperty(String name)ClassInfoImpl<T,C,F,M>getScope()Deprecated.you shouldn't be invoking this method on .org.glassfish.jaxb.core.v2.model.core.Element<T,C>getSubstitutionHead()The substitution hierarchy is the same as the inheritance hierarchy.TgetType()QNamegetTypeName()org.glassfish.jaxb.core.v2.model.annotation.LocatablegetUpstream()booleanhasAttributeWildcard()booleanhasProperties()booleanhasSubClasses()booleanhasValueProperty()booleaninheritsAttributeWildcard()booleanisAbstract()booleanisElement()booleanisFinal()booleanisOrdered()booleanisSimpleType()protected org.glassfish.jaxb.core.v2.model.nav.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 org.glassfish.jaxb.core.v2.model.annotation.AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT>reader()StringtoString()
-
-
-
Field Detail
-
clazz
protected final C clazz
-
attributeWildcard
protected 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()
-
getSubstitutionHead
public final org.glassfish.jaxb.core.v2.model.core.Element<T,C> getSubstitutionHead()
The substitution hierarchy is the same as the inheritance hierarchy.
-
getClazz
public final C getClazz()
-
getScope
@Deprecated public ClassInfoImpl<T,C,F,M> getScope()
Deprecated.you shouldn't be invoking this method on .When a bean binds to an element, it's always throughXmlRootElement, so this method always return null.
-
getType
public final T getType()
-
canBeReferencedByIDREF
public boolean canBeReferencedByIDREF()
AClassInfocan be referenced byXmlIDREFif it has an ID property.
-
getName
public final String getName()
-
readAnnotation
public <A extends Annotation> A readAnnotation(Class<A> a)
-
getProperties
public List<? extends org.glassfish.jaxb.core.v2.model.core.PropertyInfo<T,C>> getProperties()
-
hasValueProperty
public final boolean hasValueProperty()
-
getProperty
public org.glassfish.jaxb.core.v2.model.core.PropertyInfo<T,C> getProperty(String name)
-
checkFieldXmlLocation
protected void checkFieldXmlLocation(F f)
This hook is used byRuntimeClassInfoImplto look forXmlLocation.
-
hasProperties
public boolean hasProperties()
-
createReferenceProperty
protected org.glassfish.jaxb.core.v2.model.core.ReferencePropertyInfo<T,C> createReferenceProperty(PropertySeed<T,C,F,M> seed)
-
createAttributeProperty
protected org.glassfish.jaxb.core.v2.model.core.AttributePropertyInfo<T,C> createAttributeProperty(PropertySeed<T,C,F,M> seed)
-
createValueProperty
protected org.glassfish.jaxb.core.v2.model.core.ValuePropertyInfo<T,C> createValueProperty(PropertySeed<T,C,F,M> seed)
-
createElementProperty
protected org.glassfish.jaxb.core.v2.model.core.ElementPropertyInfo<T,C> createElementProperty(PropertySeed<T,C,F,M> seed)
-
createMapProperty
protected org.glassfish.jaxb.core.v2.model.core.MapPropertyInfo<T,C> createMapProperty(PropertySeed<T,C,F,M> seed)
-
createFieldSeed
protected PropertySeed<T,C,F,M> createFieldSeed(F f)
Creates a newFieldPropertySeedobject.Derived class can override this method to create a sub-class.
-
createAccessorSeed
protected PropertySeed<T,C,F,M> createAccessorSeed(M getter, M setter)
Creates a newGetterSetterPropertySeedobject.
-
isElement
public final boolean isElement()
-
isAbstract
public boolean isAbstract()
-
isOrdered
public boolean isOrdered()
-
isFinal
public final boolean isFinal()
-
hasSubClasses
public final boolean hasSubClasses()
-
hasAttributeWildcard
public final boolean hasAttributeWildcard()
-
inheritsAttributeWildcard
public final boolean inheritsAttributeWildcard()
-
declaresAttributeWildcard
public final boolean declaresAttributeWildcard()
-
getElementName
public final QName getElementName()
-
getTypeName
public final QName getTypeName()
-
isSimpleType
public final boolean isSimpleType()
-
getLocation
public org.glassfish.jaxb.core.v2.runtime.Location getLocation()
- Specified by:
getLocationin interfaceorg.glassfish.jaxb.core.v2.model.annotation.Locatable
-
getFactoryMethod
public Method getFactoryMethod()
-
getUpstream
public org.glassfish.jaxb.core.v2.model.annotation.Locatable getUpstream()
- Specified by:
getUpstreamin interfaceorg.glassfish.jaxb.core.v2.model.annotation.Locatable
-
nav
protected final org.glassfish.jaxb.core.v2.model.nav.Navigator<TypeT,ClassDeclT,FieldT,MethodT> nav()
-
reader
protected final org.glassfish.jaxb.core.v2.model.annotation.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.
-
-