Class CClassInfo

    • Field Detail

      • javadoc

        public String javadoc
        TODO: revisit this design. we should at least do a basic encapsulation to avoid careless mistakes. Maybe we should even differ the javadoc generation by queueing runners.
      • shortName

        public final String shortName
        short name.
      • model

        public final Model model
        The Model object to which this bean belongs.
    • Method Detail

      • hasAttributeWildcard

        public boolean hasAttributeWildcard()
        Specified by:
        hasAttributeWildcard in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • hasAttributeWildcard

        public void hasAttributeWildcard​(boolean hasAttributeWildcard)
      • hasSubClasses

        public boolean hasSubClasses()
        Specified by:
        hasSubClasses in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • declaresAttributeWildcard

        public boolean declaresAttributeWildcard()
        Returns true if a new attribute wildcard property needs to be declared on this class.
        Specified by:
        declaresAttributeWildcard in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • inheritsAttributeWildcard

        public boolean inheritsAttributeWildcard()
        Returns true if this class inherits a wildcard attribute property from its ancestor classes.
        Specified by:
        inheritsAttributeWildcard in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • getClazz

        public NClass getClazz()
        Specified by:
        getClazz in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • getScope

        public CClassInfo getScope()
        Specified by:
        getScope in interface com.sun.xml.bind.v2.model.core.Element<NType,​NClass>
      • getName

        public String getName()
        Specified by:
        getName in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • getSqueezedName

        public String getSqueezedName()
        Returns the "squeezed name" of this bean token.

        The squeezed name of a bean is the concatenation of the names of its outer classes and itself.

        Thus if the bean is "org.acme.foo.Bean", then the squeezed name is "Bean", if the bean is "org.acme.foo.Outer1.Outer2.Bean", then "Outer1Outer2Bean".

        This is used by the code generator

      • getProperties

        public List<CPropertyInfo> getProperties()
        Returns a mutable list.
        Specified by:
        getProperties in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • hasValueProperty

        public boolean hasValueProperty()
        Specified by:
        hasValueProperty in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • getProperty

        public CPropertyInfo getProperty​(String name)
        Gets a propery by name.
        Specified by:
        getProperty in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • hasProperties

        public boolean hasProperties()
        Specified by:
        hasProperties in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • isElement

        public boolean isElement()
        Specified by:
        isElement in interface com.sun.xml.bind.v2.model.core.MaybeElement<NType,​NClass>
      • asElement

        public com.sun.xml.bind.v2.model.core.Element<NType,​NClass> asElement()
        Specified by:
        asElement in interface com.sun.xml.bind.v2.model.core.MaybeElement<NType,​NClass>
      • isOrdered

        public boolean isOrdered()
        Specified by:
        isOrdered in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • isFinal

        public boolean isFinal()
        Deprecated.
        if you are calling this method directly, you must be doing something wrong.
        Specified by:
        isFinal in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
      • setOrdered

        public void setOrdered​(boolean value)
      • getElementName

        public QName getElementName()
        Specified by:
        getElementName in interface com.sun.xml.bind.v2.model.core.Element<NType,​NClass>
        Specified by:
        getElementName in interface com.sun.xml.bind.v2.model.core.MaybeElement<NType,​NClass>
      • getTypeName

        public QName getTypeName()
        Specified by:
        getTypeName in interface com.sun.xml.bind.v2.model.core.NonElement<NType,​NClass>
      • isSimpleType

        public boolean isSimpleType()
        Specified by:
        isSimpleType in interface com.sun.xml.bind.v2.model.core.NonElement<NType,​NClass>
      • setUserSpecifiedImplClass

        public void setUserSpecifiedImplClass​(String implClass)
      • getUserSpecifiedImplClass

        public String getUserSpecifiedImplClass()
      • addProperty

        public void addProperty​(CPropertyInfo prop)
        Adds a new property.
      • setBaseClass

        public void setBaseClass​(CClass base)
        This method accepts both CClassInfo (which means the base class is also generated), or CClassRef (which means the base class is already generated and simply referenced.) The latter is treated somewhat special --- from the rest of the model this external base class is invisible. This modeling might need more thoughts to get right.
      • getBaseClass

        public CClassInfo getBaseClass()
        This inherited version returns null if this class extends from CClassRef.
        Specified by:
        getBaseClass in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,​NClass>
        See Also:
        getRefBaseClass()
      • getRefBaseClass

        public CClassRef getRefBaseClass()
      • listSubclasses

        public Iterator<CClassInfo> listSubclasses()
        Enumerates all the sub-classes of this class.
      • getSubstitutionHead

        public CClassInfo getSubstitutionHead()
        Specified by:
        getSubstitutionHead in interface com.sun.xml.bind.v2.model.core.Element<NType,​NClass>
      • _implements

        public void _implements​(JClass c)
      • addConstructor

        public void addConstructor​(String... fieldNames)
        Creates a new constructor declaration and adds it.
      • getConstructors

        public Collection<? extends Constructor> getConstructors()
        list all constructor declarations.
      • getType

        public final NClass getType()
        Specified by:
        getType in interface com.sun.xml.bind.v2.model.core.TypeInfo<NType,​NClass>
      • isBoxedType

        public boolean isBoxedType()
        Description copied from interface: NType
        Returns true iff this type represents a class that has a unboxed form. For example, for String this is false, but for Integer this is true.
        Specified by:
        isBoxedType in interface NType
      • getLocator

        public Locator getLocator()
        Description copied from interface: CCustomizable
        Gets the source location in the schema from which this model component is created.
        Specified by:
        getLocator in interface CCustomizable
        Returns:
        never null.
      • isAbstract

        public boolean isAbstract()
        Description copied from interface: CElement
        Returns true iff this element is an abstract element.
        Specified by:
        isAbstract in interface CElement
      • setAbstract

        public void setAbstract()
        Description copied from interface: CElement
        Marks this element as an abstract element.
        Specified by:
        setAbstract in interface CElement
      • isCollection

        public final boolean isCollection()
      • getAdapterUse

        public final CAdapter getAdapterUse()
      • idUse

        public final com.sun.xml.bind.v2.model.core.ID idUse()
      • getSchemaComponent

        public final XSComponent getSchemaComponent()
        Description copied from interface: CCustomizable
        If this model object is built from XML Schema, this property returns a schema component from which the model is built.
        Specified by:
        getSchemaComponent in interface CCustomizable
        Returns:
        null if the model is built from sources other than XML Schema (such as DTD.)
      • canBeReferencedByIDREF

        public final boolean canBeReferencedByIDREF()
        Deprecated.
        why are you calling an unimplemented method?
        Specified by:
        canBeReferencedByIDREF in interface com.sun.xml.bind.v2.model.core.TypeInfo<NType,​NClass>
      • getExpectedMimeType

        public javax.activation.MimeType getExpectedMimeType()
        No default MimeType.
      • getUpstream

        public final com.sun.xml.bind.v2.model.annotation.Locatable getUpstream()
        Specified by:
        getUpstream in interface com.sun.xml.bind.v2.model.annotation.Locatable
      • getLocation

        public final com.sun.xml.bind.v2.runtime.Location getLocation()
        Specified by:
        getLocation in interface com.sun.xml.bind.v2.model.annotation.Locatable