com.sun.xml.bind.v2.model.impl
Class ArrayInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>

java.lang.Object
  extended by com.sun.xml.bind.v2.model.impl.ArrayInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
All Implemented Interfaces:
ArrayInfo<TypeT,ClassDeclT>, NonElement<TypeT,ClassDeclT>, TypeInfo<TypeT,ClassDeclT>, Location

public class ArrayInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
extends java.lang.Object
implements ArrayInfo<TypeT,ClassDeclT>, Location

Public because XJC needs to access it


Field Summary
protected  ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder
          Reference to the ModelBuilder, only until we link TypeInfos all together, because we don't want to keep ModelBuilder too long.
protected  com.sun.xml.bind.v2.model.impl.TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT> owner
          TypeInfoSet to which this class belongs.
 
Fields inherited from interface com.sun.xml.bind.v2.model.core.NonElement
ANYTYPE_NAME
 
Constructor Summary
ArrayInfoImpl(ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder, Locatable upstream, TypeT arrayType)
           
 
Method Summary
static javax.xml.namespace.QName calcArrayTypeName(javax.xml.namespace.QName n)
          Computes the type name of the array from that of the item type.
 boolean canBeReferencedByIDREF()
          Deprecated. why are you calling a method whose return value is always known?
 NonElement<TypeT,ClassDeclT> getItemType()
          T of T[].
 Location getLocation()
           
 TypeT getType()
          Gets the underlying Java type that object represents.
 javax.xml.namespace.QName getTypeName()
          Gets the primary XML type ANYTYPE_NAME of the class.
 Locatable getUpstream()
           
 boolean isSimpleType()
          Returns true if this NonElement maps to text in XML, without any attribute nor child elements.
protected  Navigator<TypeT,ClassDeclT,FieldT,MethodT> nav()
           
protected  javax.xml.namespace.QName parseElementName(ClassDeclT clazz)
          Parses an XmlRootElement annotation on a class and determine the element name.
protected  javax.xml.namespace.QName parseTypeName(ClassDeclT clazz)
           
protected  javax.xml.namespace.QName parseTypeName(ClassDeclT clazz, javax.xml.bind.annotation.XmlType t)
          Parses a (potentially-null) XmlType annotation on a class and determine the actual value.
protected  AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT> reader()
           
 java.lang.String toString()
          Returns a human-readable string that represents this position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

owner

protected final com.sun.xml.bind.v2.model.impl.TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT> owner
TypeInfoSet to which this class belongs.


builder

protected ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder
Reference to the ModelBuilder, only until we link TypeInfos all together, because we don't want to keep ModelBuilder too long.

Constructor Detail

ArrayInfoImpl

public ArrayInfoImpl(ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder,
                     Locatable upstream,
                     TypeT arrayType)
Method Detail

calcArrayTypeName

public static javax.xml.namespace.QName calcArrayTypeName(javax.xml.namespace.QName n)
Computes the type name of the array from that of the item type.


getItemType

public NonElement<TypeT,ClassDeclT> getItemType()
Description copied from interface: ArrayInfo
T of T[]. The type of the items of the array.

Specified by:
getItemType in interface ArrayInfo<TypeT,ClassDeclT>
Returns:
never null

getTypeName

public javax.xml.namespace.QName getTypeName()
Description copied from interface: NonElement
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.

Specified by:
getTypeName in interface NonElement<TypeT,ClassDeclT>
Returns:
null if the object doesn't have an explicit type ANYTYPE_NAME (AKA anonymous.)

isSimpleType

public boolean isSimpleType()
Description copied from interface: NonElement
Returns true if this NonElement maps to text in XML, without any attribute nor child elements.

Specified by:
isSimpleType in interface NonElement<TypeT,ClassDeclT>

getType

public TypeT getType()
Description copied from interface: TypeInfo
Gets the underlying Java type that object represents.

Specified by:
getType in interface TypeInfo<TypeT,ClassDeclT>
Returns:
always non-null.

canBeReferencedByIDREF

public final boolean canBeReferencedByIDREF()
Deprecated. why are you calling a method whose return value is always known?

Leaf-type cannot be referenced from IDREF.

Specified by:
canBeReferencedByIDREF in interface TypeInfo<TypeT,ClassDeclT>

getLocation

public Location getLocation()

toString

public java.lang.String toString()
Description copied from interface: Location
Returns a human-readable string that represents this position.

Specified by:
toString in interface Location
Overrides:
toString in class java.lang.Object
Returns:
never null.

getUpstream

public Locatable getUpstream()

nav

protected final Navigator<TypeT,ClassDeclT,FieldT,MethodT> nav()

reader

protected final AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT> reader()

parseElementName

protected final javax.xml.namespace.QName parseElementName(ClassDeclT clazz)
Parses an XmlRootElement annotation on a class and determine the element name.

Returns:
null if none was found.

parseTypeName

protected final javax.xml.namespace.QName parseTypeName(ClassDeclT clazz)

parseTypeName

protected final javax.xml.namespace.QName parseTypeName(ClassDeclT clazz,
                                                        javax.xml.bind.annotation.XmlType t)
Parses a (potentially-null) XmlType annotation on a class and determine the actual value.

Parameters:
clazz - The class on which the XmlType annotation is checked.
t - The XmlType annotation on the clazz. This value is taken as a parameter to improve the performance for the case where 't' is pre-computed.