ClassInfo representation.
Schema parsers build these objects.
| Modifier and Type | Field and Description |
|---|---|
| private Set | _implements
Interfaces to be implemented. |
| private CClass | |
| private static final CClassInfoParent. | |
| private final List | constructors
Constructor declarations. |
| private final QName | elementName
If this class also gets |
| private CClassInfo | firstSubclass
List of all subclasses, together with |
| private boolean | |
| private String | implClass
Optional user-specified implementation override class. |
| private boolean | |
| public String | javadoc
Todo revisit this design. |
| public final Model | |
| private CClassInfo | |
| private final CClassInfoParent | |
| private final List | |
| public final String | shortName
short name. |
| private String | squeezedName
Custom |
| private final QName |
| Access | Constructor and Description |
|---|---|
| public | CClassInfo(Model model, JPackage pkg, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations)
|
| public | CClassInfo(Model model, CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations)
|
| public | CClassInfo(Model model, JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public <T> T | accept(CClassInfoParent.
Implements com.
|
| public void | |
| public void | |
| public Element | |
| public boolean | declaresAttributeWildcard()
Implements org. Returns true if a new attribute wildcard property needs to be declared on this class. |
| public String | fullName()
Implements com. Returns the FQCN of this bean. |
| public CClassInfo | getBaseClass()
Implements org. This inherited version returns null if this class extends from |
| public NClass | getClazz()
Implements org. Gets the declaration this object is wrapping. |
| public Collection | |
| public QName | getElementName()
Implements org. Gets the element name of the class, if the class is bound to an element. |
| public CNonElement | getInfo()
Implements com.
Deprecated
Guaranteed to return this. |
| public String | getName()
Implements org. Gets the fully-qualified name of the class. |
| public JPackage | getOwnerPackage()
Implements com. Gets the nearest |
| public List | getProperties()
Implements org. Returns a mutable list. |
| public CPropertyInfo | getProperty(String name)
Implements org. Gets a propery by name. |
| public CClassRef | |
| public CClassInfo | getScope()
Implements org. If non-null, this element is only active inside the given scope. |
| public String | |
| public CClassInfo | getSubstitutionHead()
Implements org. If this element can substitute another element, return that element. |
| public NClass | getType()
Implements org. Gets the underlying Java type that object represents. |
| public QName | getTypeName()
Implements org. Gets the primary XML type ANYTYPE_NAME of the class. |
| public String | |
| public boolean | hasAttributeWildcard()
Implements org. Returns true if this bean class has an attribute wildcard. |
| public void | |
| public boolean | hasProperties()
Implements org. If the class has properties, return true. |
| public boolean | hasSubClasses()
Implements org. True if there's a known sub-type of this class in |
| public boolean | hasValueProperty()
Implements org. Returns true if this class or its ancestor has |
| public boolean | inheritsAttributeWildcard()
Implements org. Returns true if this class inherits a wildcard attribute property from its ancestor classes. |
| public boolean | isBoxedType()
Implements com. Returns true iff this type represents a class that has a unboxed form. |
| public boolean | isElement()
Implements org. If the class is bound to an element, return true. |
| public boolean | isFinal()
Implements org.
Deprecated
if you are calling this method directly, you must be doing something wrong.
If this class is marked as final and no further extension/restriction is allowed. |
| public boolean | isOrdered()
Implements org. Returns true if the properties of this class is ordered in XML. |
| public boolean | isSimpleType()
Implements org. Returns true if this maps to text in XML, without any attribute nor child elements. |
| public Iterator | |
| public CClassInfoParent | |
| public void | setBaseClass(CClass base)
This method accepts both (which means the base class
is also generated), or |
| public void | |
| public void | |
| public String | |
| public JClass | toType(Outline o, Aspect aspect)
Implements com. Returns the |
| _implements | back to summary |
|---|---|
| private Set<JClass> _implements Interfaces to be implemented. Lazily constructed. | |
| baseClass | back to summary |
|---|---|
| private CClass baseClass
| |
| calcSqueezedName | back to summary |
|---|---|
| private static final CClassInfoParent. | |
| constructors | back to summary |
|---|---|
| private final List<Constructor> constructors Constructor declarations. array of | |
| elementName | back to summary |
|---|---|
| private final QName elementName If this class also gets | |
| firstSubclass | back to summary |
|---|---|
| private CClassInfo firstSubclass List of all subclasses, together with | |
| hasAttributeWildcard | back to summary |
|---|---|
private boolean hasAttributeWildcard
| |
| implClass | back to summary |
|---|---|
| private String implClass Optional user-specified implementation override class. | |
| isOrdered | back to summary |
|---|---|
| private boolean isOrdered | |
| javadoc | back to summary |
|---|---|
| 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. | |
| model | back to summary |
|---|---|
| public final Model model The | |
| nextSibling | back to summary |
|---|---|
private CClassInfo nextSibling
| |
| parent | back to summary |
|---|---|
| private final CClassInfoParent parent
| |
| properties | back to summary |
|---|---|
| private final List<CPropertyInfo> properties | |
| shortName | back to summary |
|---|---|
| public final String shortName short name. | |
| squeezedName | back to summary |
|---|---|
| private String squeezedName Custom | |
| typeName | back to summary |
|---|---|
private final QName typeName
| |
| CClassInfo | back to summary |
|---|---|
| public CClassInfo(Model model, JPackage pkg, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) | |
| CClassInfo | back to summary |
|---|---|
| public CClassInfo(Model model, CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) | |
| CClassInfo | back to summary |
|---|---|
| public CClassInfo(Model model, JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) | |
| _implements | back to summary |
|---|---|
| public void _implements(JClass c) | |
| accept | back to summary |
|---|---|
| public <T> T accept(CClassInfoParent. Implements com.
| |
| addConstructor | back to summary |
|---|---|
| public void addConstructor(String... fieldNames) Creates a new constructor declaration and adds it. | |
| addProperty | back to summary |
|---|---|
| public void addProperty(CPropertyInfo prop) Adds a new property. | |
| asElement | back to summary |
|---|---|
| public Element Implements org. Doc from org. Returns the
| |
| declaresAttributeWildcard | back to summary |
|---|---|
| public boolean declaresAttributeWildcard() Implements org. Returns true if a new attribute wildcard property needs to be declared on this class.
| |
| fullName | back to summary |
|---|---|
| public String fullName() Implements com. Returns the FQCN of this bean.
| |
| getBaseClass | back to summary |
|---|---|
| public CClassInfo getBaseClass() Implements org. This inherited version returns null if this class extends from
| |
| getClazz | back to summary |
|---|---|
| public NClass getClazz() Implements org. Doc from org. Gets the declaration this object is wrapping.
| |
| getConstructors | back to summary |
|---|---|
| public Collection list all constructor declarations. | |
| getElementName | back to summary |
|---|---|
| public QName getElementName() Implements org. Doc from org. Gets the element name of the class, if the class is bound to an element.
| |
| getInfo | back to summary |
|---|---|
| public CNonElement getInfo() Implements com. Deprecated
Guaranteed to return this.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Gets the fully-qualified name of the class. | |
| getOwnerPackage | back to summary |
|---|---|
| public JPackage getOwnerPackage() Implements com. Doc from com. Gets the nearest
| |
| getProperties | back to summary |
|---|---|
| public List Implements org. Returns a mutable list.
| |
| getProperty | back to summary |
|---|---|
| public CPropertyInfo getProperty(String name) Implements org. Gets a propery by name.
| |
| getRefBaseClass | back to summary |
|---|---|
| public CClassRef getRefBaseClass() | |
| getScope | back to summary |
|---|---|
| public CClassInfo getScope() Implements org. Doc from org. If non-null, this element is only active inside the given scope.
| |
| getSqueezedName | back to summary |
|---|---|
| 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
| |
| getSubstitutionHead | back to summary |
|---|---|
| public CClassInfo getSubstitutionHead() Implements org. Doc from org. If this element can substitute another element, return that element. Substitutability of elements are transitive.
| |
| getType | back to summary |
|---|---|
| public NClass getType() Implements org. Doc from org. Gets the underlying Java type that object represents.
| |
| getTypeName | back to summary |
|---|---|
| public QName getTypeName() Implements org. Doc from org. Gets the primary XML type ANYTYPE_NAME of the class. A Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.
| |
| getUserSpecifiedImplClass | back to summary |
|---|---|
| public String getUserSpecifiedImplClass() | |
| hasAttributeWildcard | back to summary |
|---|---|
| public boolean hasAttributeWildcard() Implements org. Doc from org. Returns true if this bean class has an attribute wildcard. This is true if the class declares an attribute wildcard, or it is inherited from its super classes.
| |
| hasAttributeWildcard | back to summary |
|---|---|
| public void hasAttributeWildcard(boolean hasAttributeWildcard) | |
| hasProperties | back to summary |
|---|---|
| public boolean hasProperties() Implements org. Doc from org. If the class has properties, return true. This is only
true if the Collection object returned by
| |
| hasSubClasses | back to summary |
|---|---|
| public boolean hasSubClasses() Implements org. Doc from org. True if there's a known sub-type of this class in
| |
| hasValueProperty | back to summary |
|---|---|
| public boolean hasValueProperty() Implements org. Doc from org. Returns true if this class or its ancestor has
| |
| inheritsAttributeWildcard | back to summary |
|---|---|
| public boolean inheritsAttributeWildcard() Implements org. Returns true if this class inherits a wildcard attribute property from its ancestor classes.
| |
| isBoxedType | back to summary |
|---|---|
| public boolean isBoxedType() Implements com. Doc from com. Returns true iff this type represents a class that has a unboxed form.
For example, for
| |
| isElement | back to summary |
|---|---|
| public boolean isElement() Implements org. Doc from org. If the class is bound to an element, return true. Note that when this is true, the class is bound to both an element and a type.
| |
| isFinal | back to summary |
|---|---|
| public boolean isFinal() Implements org. Doc from org. Deprecated if you are calling this method directly, you must be doing something wrong. If this class is marked as final and no further extension/restriction is allowed.
| |
| isOrdered | back to summary |
|---|---|
| public boolean isOrdered() Implements org. Doc from org. Returns true if the properties of this class is ordered in XML. False if it't not.
In RELAX NG context, ordered properties mean
| |
| isSimpleType | back to summary |
|---|---|
| public boolean isSimpleType() Implements org. Doc from org. Returns true if this maps to text in XML, without any attribute nor child elements.
| |
| listSubclasses | back to summary |
|---|---|
| public Iterator Enumerates all the sub-classes of this class. | |
| parent | back to summary |
|---|---|
| public CClassInfoParent parent() | |
| setBaseClass | back to summary |
|---|---|
| public void setBaseClass(CClass base) This method accepts both (which means the base class
is also generated), or | |
| setOrdered | back to summary |
|---|---|
| public void setOrdered(boolean value) | |
| setUserSpecifiedImplClass | back to summary |
|---|---|
| public void setUserSpecifiedImplClass(String implClass) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| toType | back to summary |
|---|---|
| public JClass toType(Outline o, Aspect aspect) Implements com. Doc from com. Returns the
| |