com.sun.tools.xjc.model
Class CSingleTypePropertyInfo

java.lang.Object
  extended by com.sun.tools.xjc.model.CPropertyInfo
      extended by com.sun.tools.xjc.model.CSingleTypePropertyInfo
All Implemented Interfaces:
CCustomizable, AnnotationSource, PropertyInfo<NType,NClass>
Direct Known Subclasses:
CAttributePropertyInfo, CValuePropertyInfo

abstract class CSingleTypePropertyInfo
extends CPropertyInfo

CPropertyInfo backed by a single TypeUse.


Field Summary
protected  TypeUse type
           
 
Fields inherited from class com.sun.tools.xjc.model.CPropertyInfo
baseType, defaultValue, inlineBinaryData, javadoc, locator, realization
 
Constructor Summary
protected CSingleTypePropertyInfo(String name, TypeUse type, QName typeName, XSComponent source, CCustomizations customizations, Locator locator)
           
 
Method Summary
 CAdapter getAdapter()
           
 javax.activation.MimeType getExpectedMimeType()
          Expected MIME type, if any.
 QName getSchemaType()
          The effective value of XmlSchemaType annotation, if any.
 CSingleTypePropertyInfo getSource()
           
 CNonElement getTarget()
           
 ID id()
          Returns the IDness of the value of this element.
 List<? extends CTypeInfo> ref()
          List of TypeInfos that this property references.
 
Methods inherited from class com.sun.tools.xjc.model.CPropertyInfo
accept, collectElementNames, displayName, getCustomizations, getLocator, getName, getName, getSchemaComponent, hasAnnotation, inlineBinaryData, isCollection, isOptionalPrimitive, isUnboxable, needsExplicitTypeName, parent, readAnnotation, setName, setParent
 
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.PropertyInfo
kind
 

Field Detail

type

protected final TypeUse type
Constructor Detail

CSingleTypePropertyInfo

protected CSingleTypePropertyInfo(String name,
                                  TypeUse type,
                                  QName typeName,
                                  XSComponent source,
                                  CCustomizations customizations,
                                  Locator locator)
Parameters:
typeName - XML Schema type name of this property's single value. Optional for other schema languages. This is used to determine if we should generate @XmlSchemaType annotation to improve the roundtrip.
Method Detail

getSchemaType

public QName getSchemaType()
Description copied from interface: PropertyInfo
The effective value of XmlSchemaType annotation, if any.

If the property doesn't have XmlSchemaType annotation, this method returns null.

Since a type name is a property of a Java type, not a Java property, A schema type name of a Java type should be primarily obtained by using NonElement.getTypeName(). This method is to correctly implement the ugly semantics of XmlSchemaType (namely when this returns non-null, it overrides the type names of all types that are in this property.)


id

public final ID id()
Description copied from interface: PropertyInfo
Returns the IDness of the value of this element.

Returns:
always non-null
See Also:
XmlID, XmlIDREF

getExpectedMimeType

public final javax.activation.MimeType getExpectedMimeType()
Description copied from interface: PropertyInfo
Expected MIME type, if any.


ref

public final List<? extends CTypeInfo> ref()
Description copied from interface: PropertyInfo
List of TypeInfos that this property references. This allows the caller to traverse the reference graph without getting into the details of each different property type.

Specified by:
ref in interface PropertyInfo<NType,NClass>
Specified by:
ref in class CPropertyInfo
Returns:
non-null read-only collection.

getTarget

public final CNonElement getTarget()

getAdapter

public final CAdapter getAdapter()
Specified by:
getAdapter in interface PropertyInfo<NType,NClass>
Specified by:
getAdapter in class CPropertyInfo
Returns:
null if the property is not adapted.

getSource

public final CSingleTypePropertyInfo getSource()