CClass, CClassInfoParent, CCustomizable, CElement, CNonElement, CTypeInfo, NClass, NType, TypeUse, com.sun.xml.bind.v2.model.annotation.Locatable, com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>, com.sun.xml.bind.v2.model.core.Element<NType,NClass>, com.sun.xml.bind.v2.model.core.MaybeElement<NType,NClass>, com.sun.xml.bind.v2.model.core.NonElement<NType,NClass>, com.sun.xml.bind.v2.model.core.TypeInfo<NType,NClass>public final class CClassInfo extends java.lang.Object implements com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>, CClassInfoParent, CClass, NClass
ClassInfo representation.
Schema parsers build these objects.
CClassInfoParent.Package, CClassInfoParent.Visitor<T>| Modifier and Type | Field | Description |
|---|---|---|
java.lang.String |
javadoc |
TODO: revisit this design.
|
Model |
model |
The
Model object to which this bean belongs. |
java.lang.String |
shortName |
short name.
|
| Constructor | Description |
|---|---|
CClassInfo(Model model,
JCodeModel cm,
java.lang.String fullName,
org.xml.sax.Locator location,
javax.xml.namespace.QName typeName,
javax.xml.namespace.QName elementName,
XSComponent source,
CCustomizations customizations) |
|
CClassInfo(Model model,
JPackage pkg,
java.lang.String shortName,
org.xml.sax.Locator location,
javax.xml.namespace.QName typeName,
javax.xml.namespace.QName elementName,
XSComponent source,
CCustomizations customizations) |
|
CClassInfo(Model model,
CClassInfoParent p,
java.lang.String shortName,
org.xml.sax.Locator location,
javax.xml.namespace.QName typeName,
javax.xml.namespace.QName elementName,
XSComponent source,
CCustomizations customizations) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
_implements(JClass c) |
|
<T> T |
accept(CClassInfoParent.Visitor<T> visitor) |
|
void |
addConstructor(java.lang.String... fieldNames) |
Creates a new constructor declaration and adds it.
|
void |
addProperty(CPropertyInfo prop) |
Adds a new property.
|
com.sun.xml.bind.v2.model.core.Element<NType,NClass> |
asElement() |
|
boolean |
canBeReferencedByIDREF() |
Deprecated.
why are you calling an unimplemented method?
|
JExpression |
createConstant(Outline outline,
XmlString lexical) |
|
boolean |
declaresAttributeWildcard() |
Returns true if a new attribute wildcard property needs to be
declared on this class.
|
java.lang.String |
fullName() |
Returns the FQCN of this bean.
|
CAdapter |
getAdapterUse() |
|
CClassInfo |
getBaseClass() |
This inherited version returns null if this class extends from
CClassRef. |
NClass |
getClazz() |
|
java.util.Collection<? extends Constructor> |
getConstructors() |
list all constructor declarations.
|
CCustomizations |
getCustomizations() |
Gets the list of customizations attached to this model component.
|
javax.xml.namespace.QName |
getElementName() |
|
javax.activation.MimeType |
getExpectedMimeType() |
No default
MimeType. |
CNonElement |
getInfo() |
Deprecated.
|
com.sun.xml.bind.v2.runtime.Location |
getLocation() |
|
org.xml.sax.Locator |
getLocator() |
Gets the source location in the schema from which this model component is created.
|
java.lang.String |
getName() |
|
JPackage |
getOwnerPackage() |
Gets the nearest
JPackage. |
java.util.List<CPropertyInfo> |
getProperties() |
Returns a mutable list.
|
CPropertyInfo |
getProperty(java.lang.String name) |
Gets a propery by name.
|
CClassRef |
getRefBaseClass() |
|
XSComponent |
getSchemaComponent() |
If this model object is built from XML Schema,
this property returns a schema component from which the model is built.
|
CClassInfo |
getScope() |
|
java.lang.String |
getSqueezedName() |
Returns the "squeezed name" of this bean token.
|
CClassInfo |
getSubstitutionHead() |
|
NClass |
getType() |
|
javax.xml.namespace.QName |
getTypeName() |
|
com.sun.xml.bind.v2.model.annotation.Locatable |
getUpstream() |
|
java.lang.String |
getUserSpecifiedImplClass() |
|
boolean |
hasAttributeWildcard() |
|
void |
hasAttributeWildcard(boolean hasAttributeWildcard) |
|
boolean |
hasProperties() |
|
boolean |
hasSubClasses() |
|
boolean |
hasValueProperty() |
|
com.sun.xml.bind.v2.model.core.ID |
idUse() |
|
boolean |
inheritsAttributeWildcard() |
Returns true if this class inherits a wildcard attribute property
from its ancestor classes.
|
boolean |
isAbstract() |
Returns true iff this element is an abstract element.
|
boolean |
isBoxedType() |
Returns true iff this type represents a class that has a unboxed form.
|
boolean |
isCollection() |
|
boolean |
isElement() |
|
boolean |
isFinal() |
Deprecated.
if you are calling this method directly, you must be doing something wrong.
|
boolean |
isOrdered() |
|
boolean |
isSimpleType() |
|
java.util.Iterator<CClassInfo> |
listSubclasses() |
Enumerates all the sub-classes of this class.
|
CClassInfoParent |
parent() |
|
void |
setAbstract() |
Marks this element as an abstract element.
|
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. |
void |
setOrdered(boolean value) |
|
void |
setUserSpecifiedImplClass(java.lang.String implClass) |
|
java.lang.String |
toString() |
|
JClass |
toType(Outline o,
Aspect aspect) |
getCustomizations, getLocator, getSchemaComponentisAbstract, setAbstractgetAdapterUse, isCollectiongetLocation, getUpstreamisAbstractclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateConstant, getExpectedMimeType, idUsepublic java.lang.String javadoc
public final java.lang.String shortName
public CClassInfo(Model model, JPackage pkg, java.lang.String shortName, org.xml.sax.Locator location, javax.xml.namespace.QName typeName, javax.xml.namespace.QName elementName, XSComponent source, CCustomizations customizations)
public CClassInfo(Model model, CClassInfoParent p, java.lang.String shortName, org.xml.sax.Locator location, javax.xml.namespace.QName typeName, javax.xml.namespace.QName elementName, XSComponent source, CCustomizations customizations)
public CClassInfo(Model model, JCodeModel cm, java.lang.String fullName, org.xml.sax.Locator location, javax.xml.namespace.QName typeName, javax.xml.namespace.QName elementName, XSComponent source, CCustomizations customizations)
public boolean hasAttributeWildcard()
public void hasAttributeWildcard(boolean hasAttributeWildcard)
public boolean hasSubClasses()
public boolean declaresAttributeWildcard()
public boolean inheritsAttributeWildcard()
public NClass getClazz()
public CClassInfo getScope()
public java.lang.String getName()
public java.lang.String getSqueezedName()
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
public java.util.List<CPropertyInfo> getProperties()
public boolean hasValueProperty()
public CPropertyInfo getProperty(java.lang.String name)
public boolean hasProperties()
public boolean isElement()
@Deprecated public CNonElement getInfo()
getInfo in interface CNonElementgetInfo in interface TypeUsepublic boolean isOrdered()
public boolean isFinal()
public void setOrdered(boolean value)
public javax.xml.namespace.QName getElementName()
public javax.xml.namespace.QName getTypeName()
public boolean isSimpleType()
public java.lang.String fullName()
fullName in interface CClassInfoParentfullName in interface NTypepublic CClassInfoParent parent()
public void setUserSpecifiedImplClass(java.lang.String implClass)
public java.lang.String getUserSpecifiedImplClass()
public void addProperty(CPropertyInfo prop)
public void setBaseClass(CClass base)
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.public CClassInfo getBaseClass()
CClassRef.getBaseClass in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>getRefBaseClass()public CClassRef getRefBaseClass()
public java.util.Iterator<CClassInfo> listSubclasses()
public CClassInfo getSubstitutionHead()
public void _implements(JClass c)
public void addConstructor(java.lang.String... fieldNames)
public java.util.Collection<? extends Constructor> getConstructors()
public final <T> T accept(CClassInfoParent.Visitor<T> visitor)
accept in interface CClassInfoParentpublic JPackage getOwnerPackage()
CClassInfoParentJPackage.getOwnerPackage in interface CClassInfoParentpublic final NClass getType()
public final JClass toType(Outline o, Aspect aspect)
CTypeInfotoType in interface CTypeInfotoType in interface NClasstoType in interface NTypeaspect - If Aspect.IMPLEMENTATION, this method returns the
implementation specific class that this type represents.
If Aspect.EXPOSED, this method returns the
publicly exposed type that this type represents.
For ordinary classes, the aspect parameter is meaningless.NType.toType(Outline, com.sun.tools.xjc.outline.Aspect)public boolean isBoxedType()
NTypeString this is false, but for Integer
this is true.isBoxedType in interface NTypepublic java.lang.String toString()
toString in class java.lang.Objectpublic org.xml.sax.Locator getLocator()
CCustomizablegetLocator in interface CCustomizablepublic boolean isAbstract()
CElementisAbstract in interface CElementpublic void setAbstract()
CElementsetAbstract in interface CElementpublic final boolean isCollection()
public final CAdapter getAdapterUse()
public final com.sun.xml.bind.v2.model.core.ID idUse()
public final XSComponent getSchemaComponent()
CCustomizablegetSchemaComponent in interface CCustomizablepublic final boolean canBeReferencedByIDREF()
public javax.activation.MimeType getExpectedMimeType()
MimeType.public CCustomizations getCustomizations()
CCustomizablegetCustomizations in interface CCustomizablePlugin.getCustomizationURIs()public JExpression createConstant(Outline outline, XmlString lexical)
public final com.sun.xml.bind.v2.model.annotation.Locatable getUpstream()
getUpstream in interface com.sun.xml.bind.v2.model.annotation.Locatablepublic final com.sun.xml.bind.v2.runtime.Location getLocation()
getLocation in interface com.sun.xml.bind.v2.model.annotation.LocatableCopyright © 2018 Oracle Corporation. All rights reserved.