|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.xjc.model.AbstractCTypeInfoImpl
com.sun.tools.xjc.model.CClassInfo
public final class CClassInfo
Mutable ClassInfo
represenatation.
Schema parsers build these objects.
Field Summary | |
---|---|
boolean |
isRootElement
True if this element can be used as the root element. |
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 Summary | |
---|---|
CClassInfo(Model model,
CClassInfoParent p,
java.lang.String shortName,
org.xml.sax.Locator location,
javax.xml.namespace.QName typeName,
javax.xml.namespace.QName elementName,
com.sun.xml.xsom.XSComponent source,
CCustomizations customizations)
|
|
CClassInfo(Model model,
com.sun.codemodel.JCodeModel cm,
java.lang.String fullName,
org.xml.sax.Locator location,
javax.xml.namespace.QName typeName,
javax.xml.namespace.QName elementName,
com.sun.xml.xsom.XSComponent source,
CCustomizations customizations)
|
|
CClassInfo(Model model,
com.sun.codemodel.JPackage pkg,
java.lang.String shortName,
org.xml.sax.Locator location,
javax.xml.namespace.QName typeName,
javax.xml.namespace.QName elementName,
com.sun.xml.xsom.XSComponent source,
CCustomizations customizations)
|
Method Summary | ||
---|---|---|
void |
_implements(com.sun.codemodel.JClass c)
|
|
|
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 |
declaresAttributeWildcard()
Returns true iff a new attribute wildcard property needs to be declared on this class. |
|
java.lang.String |
fullName()
Returns the FQCN of this bean. |
|
CClassInfo |
getBaseClass()
|
|
NClass |
getClazz()
|
|
java.util.Collection<? extends Constructor> |
getConstructors()
list all constructor declarations. |
|
javax.xml.namespace.QName |
getElementName()
|
|
org.xml.sax.Locator |
getLocator()
Gets the source location in the schema from which this model component is created. |
|
java.lang.String |
getName()
|
|
com.sun.codemodel.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. |
|
CClassInfo |
getScope()
|
|
java.lang.String |
getSqueezedName()
Returns the "squeezed name" of this bean token. |
|
CClassInfo |
getSubstitutionHead()
|
|
NClass |
getType()
|
|
javax.xml.namespace.QName |
getTypeName()
|
|
java.lang.String |
getUserSpecifiedImplClass()
|
|
boolean |
hasAttributeWildcard()
|
|
void |
hasAttributeWildcard(boolean hasAttributeWildcard)
|
|
boolean |
hasProperties()
|
|
boolean |
hasSubClasses()
|
|
boolean |
inheritsAttributeWildcard()
Returns true iff 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 |
isElement()
|
|
boolean |
isFinal()
Deprecated. if you are calling this method directly, you must be doing something wrong. |
|
boolean |
isOrdered()
|
|
boolean |
isSimpleType()
|
|
CClassInfoParent |
parent()
|
|
void |
setAbstract()
Marks this element as an abstract element. |
|
void |
setBaseClass(CClassInfo base)
|
|
void |
setOrdered(boolean value)
|
|
void |
setUserSpecifiedImplClass(java.lang.String implClass)
|
|
java.lang.String |
toString()
|
|
com.sun.codemodel.JClass |
toType(Outline o,
Aspect aspect)
Returns the JClass that represents the class being bound,
under the given Outline . |
Methods inherited from class com.sun.tools.xjc.model.AbstractCTypeInfoImpl |
---|
canBeReferencedByIDREF, createConstant, getAdapterUse, getCustomizations, getExpectedMimeType, getInfo, getLocation, getSchemaComponent, getUpstream, idUse, isCollection |
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.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.TypeUse |
---|
createConstant, getAdapterUse, getExpectedMimeType, getInfo, idUse, isCollection |
Methods inherited from interface com.sun.tools.xjc.model.CCustomizable |
---|
getCustomizations, getSchemaComponent |
Methods inherited from interface com.sun.tools.xjc.model.TypeUse |
---|
createConstant, getAdapterUse, getExpectedMimeType, getInfo, idUse, isCollection |
Methods inherited from interface com.sun.tools.xjc.model.CCustomizable |
---|
getCustomizations, getSchemaComponent |
Field Detail |
---|
public java.lang.String javadoc
public final java.lang.String shortName
public final Model model
Model
object to which this bean belongs.
public boolean isRootElement
isElement()
==false.
Constructor Detail |
---|
public CClassInfo(Model model, com.sun.codemodel.JPackage pkg, java.lang.String shortName, org.xml.sax.Locator location, javax.xml.namespace.QName typeName, javax.xml.namespace.QName elementName, com.sun.xml.xsom.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, com.sun.xml.xsom.XSComponent source, CCustomizations customizations)
public CClassInfo(Model model, com.sun.codemodel.JCodeModel cm, java.lang.String fullName, org.xml.sax.Locator location, javax.xml.namespace.QName typeName, javax.xml.namespace.QName elementName, com.sun.xml.xsom.XSComponent source, CCustomizations customizations)
Method Detail |
---|
public org.xml.sax.Locator getLocator()
CCustomizable
getLocator
in interface CCustomizable
public boolean hasAttributeWildcard()
hasAttributeWildcard
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public void hasAttributeWildcard(boolean hasAttributeWildcard)
public boolean hasSubClasses()
hasSubClasses
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public boolean declaresAttributeWildcard()
declaresAttributeWildcard
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public boolean inheritsAttributeWildcard()
inheritsAttributeWildcard
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public NClass getClazz()
getClazz
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public CClassInfo getScope()
getScope
in interface com.sun.xml.bind.v2.model.core.Element<NType,NClass>
public java.lang.String getName()
getName
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
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()
getProperties
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public CPropertyInfo getProperty(java.lang.String name)
ClassInfo
getProperty
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public boolean hasProperties()
hasProperties
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public boolean isElement()
isElement
in interface com.sun.xml.bind.v2.model.core.MaybeElement<NType,NClass>
public com.sun.xml.bind.v2.model.core.Element<NType,NClass> asElement()
asElement
in interface com.sun.xml.bind.v2.model.core.MaybeElement<NType,NClass>
public boolean isOrdered()
isOrdered
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public boolean isFinal()
isFinal
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public void setOrdered(boolean value)
public javax.xml.namespace.QName getElementName()
getElementName
in interface com.sun.xml.bind.v2.model.core.Element<NType,NClass>
getElementName
in interface com.sun.xml.bind.v2.model.core.MaybeElement<NType,NClass>
public javax.xml.namespace.QName getTypeName()
getTypeName
in interface com.sun.xml.bind.v2.model.core.NonElement<NType,NClass>
public boolean isSimpleType()
isSimpleType
in interface com.sun.xml.bind.v2.model.core.NonElement<NType,NClass>
public java.lang.String fullName()
fullName
in interface CClassInfoParent
fullName
in interface NType
public CClassInfoParent parent()
public void setUserSpecifiedImplClass(java.lang.String implClass)
public java.lang.String getUserSpecifiedImplClass()
public void addProperty(CPropertyInfo prop)
public void setBaseClass(CClassInfo base)
public CClassInfo getBaseClass()
getBaseClass
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
public CClassInfo getSubstitutionHead()
getSubstitutionHead
in interface com.sun.xml.bind.v2.model.core.Element<NType,NClass>
public void _implements(com.sun.codemodel.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 CClassInfoParent
public com.sun.codemodel.JPackage getOwnerPackage()
CClassInfoParent
JPackage
.
getOwnerPackage
in interface CClassInfoParent
public final NClass getType()
getType
in interface com.sun.xml.bind.v2.model.core.TypeInfo<NType,NClass>
public final com.sun.codemodel.JClass toType(Outline o, Aspect aspect)
CTypeInfo
JClass
that represents the class being bound,
under the given Outline
.
toType
in interface CTypeInfo
toType
in interface NClass
toType
in interface NType
aspect
- 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()
NType
String
this is false, but for Integer
this is true.
isBoxedType
in interface NType
public java.lang.String toString()
toString
in class java.lang.Object
public void setAbstract()
CElement
setAbstract
in interface CElement
public boolean isAbstract()
CElement
isAbstract
in interface CElement
isAbstract
in interface NClass
isAbstract
in interface com.sun.xml.bind.v2.model.core.ClassInfo<NType,NClass>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |