com.sun.tools.xjc.model
Class CTypeRef

java.lang.Object
  extended by com.sun.tools.xjc.model.CTypeRef
All Implemented Interfaces:
NonElementRef<NType,NClass>, TypeRef<NType,NClass>

public final class CTypeRef
extends java.lang.Object
implements TypeRef<NType,NClass>

TypeRef for XJC. TODO: do we need the source schema component support here?


Field Summary
 com.sun.xml.xsom.XmlString defaultValue
           
 
Constructor Summary
CTypeRef(CNonElement type, javax.xml.namespace.QName elementName, javax.xml.namespace.QName typeName, boolean nillable, com.sun.xml.xsom.XmlString defaultValue)
           
CTypeRef(CNonElement type, com.sun.xml.xsom.XSElementDecl decl)
           
 
Method Summary
 java.lang.String getDefaultValue()
          Inside XJC, use defaultValue that has context information.
static javax.xml.namespace.QName getSimpleTypeName(com.sun.xml.xsom.XSElementDecl decl)
           
 PropertyInfo<NType,NClass> getSource()
          Gets the property which is the source of this reference.
 javax.xml.namespace.QName getTagName()
          The associated element name.
 CNonElement getTarget()
          Target of the reference.
 javax.xml.namespace.QName getTypeName()
           
 boolean isLeaf()
           
 boolean isNillable()
          Returns true if this element is nillable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultValue

public final com.sun.xml.xsom.XmlString defaultValue
Constructor Detail

CTypeRef

public CTypeRef(CNonElement type,
                com.sun.xml.xsom.XSElementDecl decl)

CTypeRef

public CTypeRef(CNonElement type,
                javax.xml.namespace.QName elementName,
                javax.xml.namespace.QName typeName,
                boolean nillable,
                com.sun.xml.xsom.XmlString defaultValue)
Method Detail

getTypeName

public javax.xml.namespace.QName getTypeName()

getSimpleTypeName

public static javax.xml.namespace.QName getSimpleTypeName(com.sun.xml.xsom.XSElementDecl decl)

getTarget

public CNonElement getTarget()
Description copied from interface: NonElementRef
Target of the reference.

Specified by:
getTarget in interface NonElementRef<NType,NClass>
Returns:
never null

getTagName

public javax.xml.namespace.QName getTagName()
Description copied from interface: TypeRef
The associated element name.

Specified by:
getTagName in interface TypeRef<NType,NClass>
Returns:
never null.

isNillable

public boolean isNillable()
Description copied from interface: TypeRef
Returns true if this element is nillable.

Specified by:
isNillable in interface TypeRef<NType,NClass>

getDefaultValue

public java.lang.String getDefaultValue()
Inside XJC, use defaultValue that has context information. This method is to override the one defined in the runtime model.

Specified by:
getDefaultValue in interface TypeRef<NType,NClass>
See Also:
defaultValue

isLeaf

public boolean isLeaf()

getSource

public PropertyInfo<NType,NClass> getSource()
Description copied from interface: NonElementRef
Gets the property which is the source of this reference.

Specified by:
getSource in interface NonElementRef<NType,NClass>
Returns:
never null