|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.tools.xjc.model.CClassInfo
public final class CClassInfo
Mutable ClassInfo represenatation.
Schema parsers build these objects.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.sun.tools.xjc.model.CClassInfoParent |
|---|
CClassInfoParent.Package, CClassInfoParent.Visitor<T> |
| Field Summary | |
|---|---|
String |
javadoc
TODO: revisit this design. |
Model |
model
The Model object to which this bean belongs. |
String |
shortName
short name. |
| Fields inherited from interface com.sun.xml.bind.v2.model.core.NonElement |
|---|
ANYTYPE_NAME |
| Constructor Summary | |
|---|---|
CClassInfo(Model model,
CClassInfoParent p,
String shortName,
Locator location,
QName typeName,
QName elementName,
XSComponent source,
CCustomizations customizations)
|
|
CClassInfo(Model model,
JCodeModel cm,
String fullName,
Locator location,
QName typeName,
QName elementName,
XSComponent source,
CCustomizations customizations)
|
|
CClassInfo(Model model,
JPackage pkg,
String shortName,
Locator location,
QName typeName,
QName elementName,
XSComponent source,
CCustomizations customizations)
|
|
| Method Summary | ||
|---|---|---|
void |
_implements(JClass c)
|
|
|
accept(CClassInfoParent.Visitor<T> visitor)
|
|
void |
addConstructor(String... fieldNames)
Creates a new constructor declaration and adds it. |
|
void |
addProperty(CPropertyInfo prop)
Adds a new property. |
|
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. |
|
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()
|
|
Collection<? extends Constructor> |
getConstructors()
list all constructor declarations. |
|
CCustomizations |
getCustomizations()
Gets the list of customizations attached to this model component. |
|
QName |
getElementName()
|
|
MimeType |
getExpectedMimeType()
No default MimeType. |
|
CNonElement |
getInfo()
Deprecated. |
|
Location |
getLocation()
|
|
Locator |
getLocator()
Gets the source location in the schema from which this model component is created. |
|
String |
getName()
|
|
JPackage |
getOwnerPackage()
Gets the nearest JPackage. |
|
List<CPropertyInfo> |
getProperties()
Returns a mutable list. |
|
CPropertyInfo |
getProperty(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()
|
|
String |
getSqueezedName()
Returns the "squeezed name" of this bean token. |
|
CClassInfo |
getSubstitutionHead()
|
|
NClass |
getType()
|
|
QName |
getTypeName()
|
|
Locatable |
getUpstream()
|
|
String |
getUserSpecifiedImplClass()
|
|
boolean |
hasAttributeWildcard()
|
|
void |
hasAttributeWildcard(boolean hasAttributeWildcard)
|
|
boolean |
hasProperties()
|
|
boolean |
hasSubClasses()
|
|
boolean |
hasValueProperty()
|
|
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()
|
|
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(String implClass)
|
|
String |
toString()
|
|
JClass |
toType(Outline o,
Aspect aspect)
Returns the JClass that represents the class being bound,
under the given Outline. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sun.xml.bind.v2.model.core.ClassInfo |
|---|
isAbstract |
| Methods inherited from interface com.sun.tools.xjc.model.CNonElement |
|---|
getAdapterUse, isCollection |
| Methods inherited from interface com.sun.tools.xjc.model.TypeUse |
|---|
createConstant, getExpectedMimeType, idUse |
| Methods inherited from interface com.sun.tools.xjc.model.CElement |
|---|
isAbstract, setAbstract |
| Methods inherited from interface com.sun.tools.xjc.model.CCustomizable |
|---|
getCustomizations, getLocator, getSchemaComponent |
| Methods inherited from interface com.sun.xml.bind.v2.model.core.TypeInfo |
|---|
canBeReferencedByIDREF |
| Methods inherited from interface com.sun.xml.bind.v2.model.annotation.Locatable |
|---|
getLocation, getUpstream |
| Methods inherited from interface com.sun.tools.xjc.model.nav.NClass |
|---|
isAbstract |
| Field Detail |
|---|
public String javadoc
public final String shortName
public final Model model
Model object to which this bean belongs.
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
public boolean hasAttributeWildcard()
hasAttributeWildcard in interface ClassInfo<NType,NClass>public void hasAttributeWildcard(boolean hasAttributeWildcard)
public boolean hasSubClasses()
hasSubClasses in interface ClassInfo<NType,NClass>public boolean declaresAttributeWildcard()
declaresAttributeWildcard in interface ClassInfo<NType,NClass>public boolean inheritsAttributeWildcard()
inheritsAttributeWildcard in interface ClassInfo<NType,NClass>public NClass getClazz()
getClazz in interface ClassInfo<NType,NClass>public CClassInfo getScope()
getScope in interface Element<NType,NClass>public String getName()
getName in interface ClassInfo<NType,NClass>public 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 List<CPropertyInfo> getProperties()
getProperties in interface ClassInfo<NType,NClass>public boolean hasValueProperty()
hasValueProperty in interface ClassInfo<NType,NClass>public CPropertyInfo getProperty(String name)
getProperty in interface ClassInfo<NType,NClass>public boolean hasProperties()
hasProperties in interface ClassInfo<NType,NClass>public boolean isElement()
isElement in interface MaybeElement<NType,NClass>@Deprecated public CNonElement getInfo()
getInfo in interface CNonElementgetInfo in interface TypeUsepublic Element<NType,NClass> asElement()
asElement in interface MaybeElement<NType,NClass>public boolean isOrdered()
isOrdered in interface ClassInfo<NType,NClass>public boolean isFinal()
isFinal in interface ClassInfo<NType,NClass>public void setOrdered(boolean value)
public QName getElementName()
getElementName in interface Element<NType,NClass>getElementName in interface MaybeElement<NType,NClass>public QName getTypeName()
getTypeName in interface NonElement<NType,NClass>public boolean isSimpleType()
isSimpleType in interface NonElement<NType,NClass>public String fullName()
fullName in interface CClassInfoParentfullName in interface NTypepublic CClassInfoParent parent()
public void setUserSpecifiedImplClass(String implClass)
public 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 ClassInfo<NType,NClass>getRefBaseClass()public CClassRef getRefBaseClass()
public Iterator<CClassInfo> listSubclasses()
public CClassInfo getSubstitutionHead()
getSubstitutionHead in interface Element<NType,NClass>public void _implements(JClass c)
public void addConstructor(String... fieldNames)
public 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()
getType in interface TypeInfo<NType,NClass>
public final JClass toType(Outline o,
Aspect aspect)
CTypeInfoJClass that represents the class being bound,
under the given Outline.
toType 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, Aspect)public boolean isBoxedType()
NTypeString this is false, but for Integer
this is true.
isBoxedType in interface NTypepublic String toString()
toString in class Objectpublic Locator getLocator()
CCustomizable
getLocator in interface CCustomizablepublic boolean isAbstract()
CElement
isAbstract in interface CElementpublic void setAbstract()
CElement
setAbstract in interface CElementpublic final boolean isCollection()
public final CAdapter getAdapterUse()
public final ID idUse()
public final XSComponent getSchemaComponent()
CCustomizable
getSchemaComponent in interface CCustomizablepublic final boolean canBeReferencedByIDREF()
canBeReferencedByIDREF in interface TypeInfo<NType,NClass>public MimeType getExpectedMimeType()
MimeType.
public CCustomizations getCustomizations()
CCustomizable
getCustomizations in interface CCustomizablePlugin.getCustomizationURIs()
public JExpression createConstant(Outline outline,
XmlString lexical)
public final Locatable getUpstream()
getUpstream in interface Locatablepublic final Location getLocation()
getLocation in interface Locatable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||