Top Description Fields Constructors Methods
com.sun.tools.xjc.model

public final Class CClassRef

extends AbstractCElement
implements NClass, CClass
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.model.CClass, com.sun.tools.xjc.model.CElement, org.glassfish.jaxb.core.v2.model.core.Element, org.glassfish.jaxb.core.v2.model.core.TypeInfo, org.glassfish.jaxb.core.v2.model.annotation.Locatable, com.sun.tools.xjc.model.CTypeInfo, com.sun.tools.xjc.model.CCustomizable, com.sun.tools.xjc.model.CNonElement, com.sun.tools.xjc.model.TypeUse, org.glassfish.jaxb.core.v2.model.core.NonElement, com.sun.tools.xjc.model.nav.NClass, com.sun.tools.xjc.model.nav.NType
Imports
javax.xml.namespace.QName, com.sun.codemodel.JClass, com.sun.tools.xjc.model.nav.NClass, .NType, com.sun.tools.xjc.outline.Aspect, .Outline, com.sun.tools.xjc.reader.xmlschema.bindinfo.BIClass, .BIEnum, com.sun.xml.xsom.XSComponent

Reference to an existing class.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private JClass
clazz

Cached for both performance and single identity.

private final String

Constructor Summary

AccessConstructor and Description
public
CClassRef(Model model, XSComponent source, BIClass
The BIClass declaration that has BIClass#getExistingClassRef()
decl
,
CCustomizations customizations)

public
CClassRef(Model model, XSComponent source, BIEnum
The BIClass declaration that has BIEnum#ref
decl
,
CCustomizations customizations)

Method Summary

Modifier and TypeMethod and Description
public String
fullName()

Implements com.sun.tools.xjc.model.nav.NType.fullName.

Human readable name of this type.

public QName
getElementName()

Implements org.glassfish.jaxb.core.v2.model.core.Element.getElementName.

Gets the element name of the class.

public CNonElement
getInfo()

Implements com.sun.tools.xjc.model.CNonElement.getInfo.

Deprecated

Guaranteed to return this.

public CClassInfo
getScope()

Implements org.glassfish.jaxb.core.v2.model.core.Element.getScope.

If non-null, this element is only active inside the given scope.

public CElement
getSubstitutionHead()

Implements org.glassfish.jaxb.core.v2.model.core.Element.getSubstitutionHead.

If this element can substitute another element, return that element.

public NType
getType()

Implements org.glassfish.jaxb.core.v2.model.core.TypeInfo.getType.

Gets the underlying Java type that object represents.

public QName
getTypeName()

Implements org.glassfish.jaxb.core.v2.model.core.NonElement.getTypeName.

Gets the primary XML type ANYTYPE_NAME of the class.

public boolean
public boolean
isBoxedType()

Implements com.sun.tools.xjc.model.nav.NType.isBoxedType.

Returns true iff this type represents a class that has a unboxed form.

public boolean
isSimpleType()

Implements org.glassfish.jaxb.core.v2.model.core.NonElement.isSimpleType.

Returns true if this maps to text in XML, without any attribute nor child elements.

public void
public JClass
toType(Outline o, Aspect aspect)

Implements com.sun.tools.xjc.model.nav.NClass.toType, com.sun.tools.xjc.model.CTypeInfo.toType.

Returns the representation of this type in code model.

Inherited from com.sun.tools.xjc.model.AbstractCElement:
getLocator

Field Detail

clazzback to summary
private JClass clazz

Cached for both performance and single identity.

fullyQualifiedClassNameback to summary
private final String fullyQualifiedClassName

Constructor Detail

CClassRefback to summary
public CClassRef(Model model, XSComponent source, BIClass decl, CCustomizations customizations)
Parameters
decl:BIClass

The BIClass declaration that has BIClass#getExistingClassRef()

CClassRefback to summary
public CClassRef(Model model, XSComponent source, BIEnum decl, CCustomizations customizations)
Parameters
decl:BIEnum

The BIClass declaration that has BIEnum#ref

Method Detail

fullNameback to summary
public String fullName()

Implements com.sun.tools.xjc.model.nav.NType.fullName.

Doc from com.sun.tools.xjc.model.nav.NType.fullName.

Human readable name of this type.

Annotations
@Override
getElementNameback to summary
public QName getElementName()

Implements org.glassfish.jaxb.core.v2.model.core.Element.getElementName.

Doc from org.glassfish.jaxb.core.v2.model.core.Element.getElementName.

Gets the element name of the class.

Annotations
@Override
getInfoback to summary
public CNonElement getInfo()

Implements com.sun.tools.xjc.model.CNonElement.getInfo.

Deprecated

Guaranteed to return this.

Annotations
@Deprecated
@Override
getScopeback to summary
public CClassInfo getScope()

Implements org.glassfish.jaxb.core.v2.model.core.Element.getScope.

Doc from org.glassfish.jaxb.core.v2.model.core.Element.getScope.

If non-null, this element is only active inside the given scope.

Annotations
@Override
getSubstitutionHeadback to summary
public CElement getSubstitutionHead()

Implements org.glassfish.jaxb.core.v2.model.core.Element.getSubstitutionHead.

Doc from org.glassfish.jaxb.core.v2.model.core.Element.getSubstitutionHead.

If this element can substitute another element, return that element.

Substitutability of elements are transitive.

Annotations
@Override
getTypeback to summary
public NType getType()

Implements org.glassfish.jaxb.core.v2.model.core.TypeInfo.getType.

Doc from org.glassfish.jaxb.core.v2.model.core.TypeInfo.getType.

Gets the underlying Java type that object represents.

Annotations
@Override
getTypeNameback to summary
public QName getTypeName()

Implements org.glassfish.jaxb.core.v2.model.core.NonElement.getTypeName.

Doc from org.glassfish.jaxb.core.v2.model.core.NonElement.getTypeName.

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.

Annotations
@Override
isAbstractback to summary
public boolean isAbstract()

Overrides com.sun.tools.xjc.model.AbstractCElement.isAbstract.

Implements com.sun.tools.xjc.model.nav.NClass.isAbstract, com.sun.tools.xjc.model.CElement.isAbstract.

Doc from com.sun.tools.xjc.model.CElement.isAbstract.

Returns true iff this element is an abstract element.

Annotations
@Override
isBoxedTypeback to summary
public boolean isBoxedType()

Implements com.sun.tools.xjc.model.nav.NType.isBoxedType.

Doc from com.sun.tools.xjc.model.nav.NType.isBoxedType.

Returns true iff this type represents a class that has a unboxed form. For example, for String this is false, but for Integer this is true.

Annotations
@Override
isSimpleTypeback to summary
public boolean isSimpleType()

Implements org.glassfish.jaxb.core.v2.model.core.NonElement.isSimpleType.

Doc from org.glassfish.jaxb.core.v2.model.core.NonElement.isSimpleType.

Returns true if this maps to text in XML, without any attribute nor child elements.

Annotations
@Override
setAbstractback to summary
public void setAbstract()

Overrides com.sun.tools.xjc.model.AbstractCElement.setAbstract.

Implements com.sun.tools.xjc.model.CElement.setAbstract.

Doc from com.sun.tools.xjc.model.CElement.setAbstract.

Marks this element as an abstract element.

Annotations
@Override
toTypeback to summary
public JClass toType(Outline o, Aspect aspect)

Implements com.sun.tools.xjc.model.nav.NClass.toType, com.sun.tools.xjc.model.CTypeInfo.toType.

Doc from com.sun.tools.xjc.model.nav.NType.toType.

Returns the representation of this type in code model.

This operation requires the whole model to be built, and hence it takes Outline.

Under some code generation strategy, some bean classes are considered implementation specific (such as impl.FooImpl class) These classes always have accompanying "exposed" type (such as the Foo interface).

For such Jekyll and Hyde type, the aspect parameter determines which personality is returned.

Annotations
@Override