|
||||||||||
| 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.AbstractCElement
com.sun.tools.xjc.model.CElementInfo
public final class CElementInfo
ElementInfo implementation for the compile-time model.
As an NType, it represents the Java representation of this element (either JAXBElement<T> or Foo).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.sun.tools.xjc.model.CClassInfoParent |
|---|
CClassInfoParent.Package, CClassInfoParent.Visitor<T> |
| Field Summary | |
|---|---|
CClassInfoParent |
parent
If this element is global, the element info is considered to be package-level, and this points to the package in which this element lives in. |
| Constructor Summary | |
|---|---|
CElementInfo(Model model,
javax.xml.namespace.QName tagName,
CClassInfoParent parent,
java.lang.String className,
CCustomizations customizations,
org.xml.sax.Locator location)
Creates an element with a class in the given parent. |
|
CElementInfo(Model model,
javax.xml.namespace.QName tagName,
CClassInfoParent parent,
TypeUse contentType,
com.sun.xml.xsom.XmlString defaultValue,
com.sun.xml.xsom.XSElementDecl source,
CCustomizations customizations,
org.xml.sax.Locator location)
Creates an element in the given parent. |
|
| Method Summary | ||
|---|---|---|
com.sun.codemodel.JPackage |
_package()
|
|
|
accept(CClassInfoParent.Visitor<T> visitor)
|
|
java.lang.String |
fullName()
Returns the fully-qualified name. |
|
NType |
getContentInMemoryType()
|
|
CNonElement |
getContentType()
|
|
java.lang.String |
getDefaultValue()
|
|
javax.xml.namespace.QName |
getElementName()
|
|
com.sun.codemodel.JPackage |
getOwnerPackage()
Gets the nearest JPackage. |
|
CElementPropertyInfo |
getProperty()
|
|
CClassInfo |
getScope()
|
|
java.lang.String |
getSqueezedName()
Returns the "squeezed name" of this element. |
|
CElementInfo |
getSubstitutionHead()
|
|
java.util.Collection<CElementInfo> |
getSubstitutionMembers()
|
|
NType |
getType()
Deprecated. why are you calling a method that returns this? |
|
boolean |
hasClass()
True if this element has its own class (as opposed to be represented as an instance of JAXBElement. |
|
void |
initContentType(TypeUse contentType,
com.sun.xml.xsom.XSElementDecl source,
com.sun.xml.xsom.XmlString defaultValue)
|
|
boolean |
isBoxedType()
Returns true iff this type represents a class that has a unboxed form. |
|
void |
setSubstitutionHead(CElementInfo substitutionHead)
|
|
java.lang.String |
shortName()
|
|
com.sun.codemodel.JType |
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.AbstractCElement |
|---|
getLocator, isAbstract, setAbstract |
| Methods inherited from class com.sun.tools.xjc.model.AbstractCTypeInfoImpl |
|---|
canBeReferencedByIDREF, createConstant, getAdapterUse, getCustomizations, getExpectedMimeType, getLocation, getSchemaComponent, getUpstream, idUse, isCollection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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.CCustomizable |
|---|
getCustomizations, getSchemaComponent |
| Field Detail |
|---|
public final CClassInfoParent parent
For local elements, this points to the parent CClassInfo.
| Constructor Detail |
|---|
public CElementInfo(Model model,
javax.xml.namespace.QName tagName,
CClassInfoParent parent,
TypeUse contentType,
com.sun.xml.xsom.XmlString defaultValue,
com.sun.xml.xsom.XSElementDecl source,
CCustomizations customizations,
org.xml.sax.Locator location)
When using this construction, initContentType(TypeUse, XSElementDecl, XmlString)
must not be invoked.
public CElementInfo(Model model,
javax.xml.namespace.QName tagName,
CClassInfoParent parent,
java.lang.String className,
CCustomizations customizations,
org.xml.sax.Locator location)
When using this construction, the caller must use
initContentType(TypeUse, XSElementDecl, XmlString) to fill in the content type
later.
This is to avoid a circular model construction dependency between buidling a type
inside an element and element itself. To build a content type, you need to have
CElementInfo for a parent, so we can't take it as a constructor parameter.
| Method Detail |
|---|
public void initContentType(TypeUse contentType,
@Nullable
com.sun.xml.xsom.XSElementDecl source,
com.sun.xml.xsom.XmlString defaultValue)
public final java.lang.String getDefaultValue()
public final com.sun.codemodel.JPackage _package()
public CNonElement getContentType()
getContentType in interface com.sun.xml.bind.v2.model.core.ElementInfo<NType,NClass>public NType getContentInMemoryType()
getContentInMemoryType in interface com.sun.xml.bind.v2.model.core.ElementInfo<NType,NClass>public CElementPropertyInfo getProperty()
getProperty in interface com.sun.xml.bind.v2.model.core.ElementInfo<NType,NClass>public CClassInfo getScope()
getScope in interface com.sun.xml.bind.v2.model.core.Element<NType,NClass>public NType getType()
getType in interface com.sun.xml.bind.v2.model.core.ElementInfo<NType,NClass>getType in interface com.sun.xml.bind.v2.model.core.TypeInfo<NType,NClass>public javax.xml.namespace.QName getElementName()
getElementName in interface com.sun.xml.bind.v2.model.core.Element<NType,NClass>
public com.sun.codemodel.JType toType(Outline o,
Aspect aspect)
CTypeInfoJClass that represents the class being bound,
under the given Outline.
toType in interface CTypeInfotoType 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 java.lang.String getSqueezedName()
CClassInfo.getSqueezedName()public CElementInfo getSubstitutionHead()
getSubstitutionHead in interface com.sun.xml.bind.v2.model.core.Element<NType,NClass>getSubstitutionHead in interface com.sun.xml.bind.v2.model.core.ElementInfo<NType,NClass>public java.util.Collection<CElementInfo> getSubstitutionMembers()
getSubstitutionMembers in interface com.sun.xml.bind.v2.model.core.ElementInfo<NType,NClass>public void setSubstitutionHead(CElementInfo substitutionHead)
public boolean isBoxedType()
NTypeString this is false, but for Integer
this is true.
isBoxedType in interface NTypepublic java.lang.String fullName()
CClassInfoParent
fullName in interface CClassInfoParentfullName in interface NTypepublic <T> T accept(CClassInfoParent.Visitor<T> visitor)
accept in interface CClassInfoParentpublic com.sun.codemodel.JPackage getOwnerPackage()
CClassInfoParentJPackage.
getOwnerPackage in interface CClassInfoParentpublic java.lang.String shortName()
public boolean hasClass()
JAXBElement.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||