Class 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 the ClassInfo that doesn't depend on a particular reflection library.
    Author:
    Kohsuke Kawaguchi (kk@kohsuke.org)
    • 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
        TypeInfoSet to which this class belongs.
      • builder

        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.
    • Method Detail

      • getBaseClass

        public ClassInfoImpl<T,​C,​F,​M> getBaseClass()
        Specified by:
        getBaseClass in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • getSubstitutionHead

        public final org.glassfish.jaxb.core.v2.model.core.Element<T,​C> getSubstitutionHead()
        The substitution hierarchy is the same as the inheritance hierarchy.
        Specified by:
        getSubstitutionHead in interface org.glassfish.jaxb.core.v2.model.core.Element<T,​C>
      • getClazz

        public final C getClazz()
        Specified by:
        getClazz in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • 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 through XmlRootElement, so this method always return null.
        Specified by:
        getScope in interface org.glassfish.jaxb.core.v2.model.core.Element<T,​C>
      • getType

        public final T getType()
        Specified by:
        getType in interface org.glassfish.jaxb.core.v2.model.core.TypeInfo<T,​C>
      • canBeReferencedByIDREF

        public boolean canBeReferencedByIDREF()
        A ClassInfo can be referenced by XmlIDREF if it has an ID property.
        Specified by:
        canBeReferencedByIDREF in interface org.glassfish.jaxb.core.v2.model.core.TypeInfo<T,​C>
      • getName

        public final String getName()
        Specified by:
        getName in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • readAnnotation

        public <A extends Annotation> A readAnnotation​(Class<A> a)
      • asElement

        public org.glassfish.jaxb.core.v2.model.core.Element<T,​C> asElement()
        Specified by:
        asElement in interface org.glassfish.jaxb.core.v2.model.core.MaybeElement<T,​C>
      • getProperties

        public List<? extends org.glassfish.jaxb.core.v2.model.core.PropertyInfo<T,​C>> getProperties()
        Specified by:
        getProperties in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • hasValueProperty

        public final boolean hasValueProperty()
        Specified by:
        hasValueProperty in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • getProperty

        public org.glassfish.jaxb.core.v2.model.core.PropertyInfo<T,​C> getProperty​(String name)
        Specified by:
        getProperty in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • checkFieldXmlLocation

        protected void checkFieldXmlLocation​(F f)
        This hook is used by RuntimeClassInfoImpl to look for XmlLocation.
      • hasProperties

        public boolean hasProperties()
        Specified by:
        hasProperties in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • 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 new FieldPropertySeed object.

        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 new GetterSetterPropertySeed object.
      • isElement

        public final boolean isElement()
        Specified by:
        isElement in interface org.glassfish.jaxb.core.v2.model.core.MaybeElement<T,​C>
      • isAbstract

        public boolean isAbstract()
        Specified by:
        isAbstract in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • isOrdered

        public boolean isOrdered()
        Specified by:
        isOrdered in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • isFinal

        public final boolean isFinal()
        Specified by:
        isFinal in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • hasSubClasses

        public final boolean hasSubClasses()
        Specified by:
        hasSubClasses in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • hasAttributeWildcard

        public final boolean hasAttributeWildcard()
        Specified by:
        hasAttributeWildcard in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • inheritsAttributeWildcard

        public final boolean inheritsAttributeWildcard()
        Specified by:
        inheritsAttributeWildcard in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • declaresAttributeWildcard

        public final boolean declaresAttributeWildcard()
        Specified by:
        declaresAttributeWildcard in interface org.glassfish.jaxb.core.v2.model.core.ClassInfo<T,​C>
      • getElementName

        public final QName getElementName()
        Specified by:
        getElementName in interface org.glassfish.jaxb.core.v2.model.core.Element<T,​C>
        Specified by:
        getElementName in interface org.glassfish.jaxb.core.v2.model.core.MaybeElement<T,​C>
      • getTypeName

        public final QName getTypeName()
        Specified by:
        getTypeName in interface org.glassfish.jaxb.core.v2.model.core.NonElement<T,​C>
      • isSimpleType

        public final boolean isSimpleType()
        Specified by:
        isSimpleType in interface org.glassfish.jaxb.core.v2.model.core.NonElement<T,​C>
      • getLocation

        public org.glassfish.jaxb.core.v2.runtime.Location getLocation()
        Specified by:
        getLocation in interface org.glassfish.jaxb.core.v2.model.annotation.Locatable
      • getFactoryMethod

        public Method getFactoryMethod()
      • getUpstream

        public org.glassfish.jaxb.core.v2.model.annotation.Locatable getUpstream()
        Specified by:
        getUpstream in interface org.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 an XmlRootElement annotation 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) XmlType annotation on a class and determine the actual value.
        Parameters:
        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.