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

java.lang.Object
  extended by com.sun.xml.bind.v2.model.impl.TypeInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
All Implemented Interfaces:
Locatable, TypeInfo<TypeT,ClassDeclT>
Direct Known Subclasses:
ArrayInfoImpl, ClassInfoImpl, ElementInfoImpl, EnumLeafInfoImpl

abstract class TypeInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
extends Object
implements TypeInfo<TypeT,ClassDeclT>, Locatable

Common implementation between ClassInfoImpl and ElementInfoImpl.


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  TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT> owner
          TypeInfoSet to which this class belongs.
 
Constructor Summary
protected TypeInfoImpl(ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder, Locatable upstream)
           
 
Method Summary
 Locatable getUpstream()
          Gets the upstream Location information.
(package private)  void link()
           
protected  Navigator<TypeT,ClassDeclT,FieldT,MethodT> nav()
           
protected  QName parseElementName(ClassDeclT clazz)
          Parses an XmlRootElement annotation on a class and determine the element name.
protected  QName parseTypeName(ClassDeclT clazz)
           
protected  QName parseTypeName(ClassDeclT clazz, XmlType t)
          Parses a (potentially-null) XmlType annotation on a class and determine the actual value.
protected  AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT> reader()
           
 
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, getType
 
Methods inherited from interface com.sun.xml.bind.v2.model.annotation.Locatable
getLocation
 

Field Detail

owner

protected final 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

TypeInfoImpl

protected TypeInfoImpl(ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder,
                       Locatable upstream)
Method Detail

getUpstream

public Locatable getUpstream()
Description copied from interface: Locatable
Gets the upstream Location information.

Specified by:
getUpstream in interface Locatable
Returns:
can be null.

link

void link()

nav

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

reader

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

parseElementName

protected final 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 QName parseTypeName(ClassDeclT clazz)

parseTypeName

protected final QName parseTypeName(ClassDeclT clazz,
                                    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.