Apache CXF API

org.apache.cxf.aegis.type
Class AbstractTypeCreator

java.lang.Object
  extended by org.apache.cxf.aegis.type.AbstractTypeCreator
All Implemented Interfaces:
TypeCreator
Direct Known Subclasses:
DefaultTypeCreator, Java5TypeCreator, XMLTypeCreator

public abstract class AbstractTypeCreator
extends Object
implements TypeCreator


Field Summary
static String HTTP_CXF_APACHE_ORG_ARRAYS
           
protected  AbstractTypeCreator nextCreator
           
protected  TypeMapping tm
           
 
Constructor Summary
AbstractTypeCreator()
           
 
Method Summary
protected  AegisType createArrayType(TypeClassInfo info)
           
 TypeClassInfo createBasicClassInfo(Type type)
          Create class info for a Type.
 TypeClassInfo createClassInfo(Field f)
           
abstract  TypeClassInfo createClassInfo(Method m, int index)
          Retrieve the classInfo for a method.
abstract  TypeClassInfo createClassInfo(PropertyDescriptor pd)
           
protected  QName createCollectionQName(TypeClassInfo info, AegisType type)
           
abstract  AegisType createCollectionType(TypeClassInfo info)
           
protected  AegisType createCollectionTypeFromGeneric(TypeClassInfo info)
           
abstract  AegisType createDefaultType(TypeClassInfo info)
           
 AegisType createEnumType(TypeClassInfo info)
           
protected  AegisType createHolderType(TypeClassInfo info)
           
protected  QName createMapQName(TypeClassInfo info, AegisType keyType, AegisType valueType)
           
protected  AegisType createMapType(TypeClassInfo info)
           
protected  AegisType createMapType(TypeClassInfo info, AegisType keyType, AegisType valueType)
           
protected  AegisType createObjectType()
           
protected  QName createQName(Class javaType)
           
 AegisType createType(Class clazz)
           
 AegisType createType(Field f)
          Create type information for a Field.
 AegisType createType(Method m, int index)
          Create a AegisType for a Method parameter.
 AegisType createType(PropertyDescriptor pd)
          Create type information for a PropertyDescriptor.
 AegisType createType(Type t)
          Create an Aegis type from a reflected type description.
 AegisType createTypeForClass(TypeClassInfo info)
          Turn a TypeClassInfo into a type.
protected  AegisType createUserType(TypeClassInfo info)
           
 TypeCreationOptions getConfiguration()
           
 QName getElementName(Method m, int index)
          Get the mapped name of a method parameter.
protected  AegisType getOrCreateGenericType(TypeClassInfo info)
           
protected  AegisType getOrCreateMapKeyType(TypeClassInfo info)
           
protected  AegisType getOrCreateMapValueType(TypeClassInfo info)
           
 TypeCreator getParent()
           
 TypeCreator getTopCreator()
           
 TypeMapping getTypeMapping()
           
protected  boolean isArray(Class javaType)
           
protected  boolean isCollection(Class javaType)
           
protected  boolean isEnum(Class javaType)
           
protected  boolean isHolder(Class javaType)
           
protected  boolean isMap(Class javaType)
           
 void setConfiguration(TypeCreationOptions tpConfiguration)
           
 void setNextCreator(AbstractTypeCreator creator)
           
 void setParent(TypeCreator parent)
           
 void setTypeMapping(TypeMapping typeMapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_CXF_APACHE_ORG_ARRAYS

public static final String HTTP_CXF_APACHE_ORG_ARRAYS
See Also:
Constant Field Values

tm

protected TypeMapping tm

nextCreator

protected AbstractTypeCreator nextCreator
Constructor Detail

AbstractTypeCreator

public AbstractTypeCreator()
Method Detail

getTypeMapping

public TypeMapping getTypeMapping()

getTopCreator

public TypeCreator getTopCreator()

getParent

public TypeCreator getParent()
Specified by:
getParent in interface TypeCreator

setParent

public void setParent(TypeCreator parent)
Specified by:
setParent in interface TypeCreator

setTypeMapping

public void setTypeMapping(TypeMapping typeMapping)
Specified by:
setTypeMapping in interface TypeCreator

setNextCreator

public void setNextCreator(AbstractTypeCreator creator)

createClassInfo

public TypeClassInfo createClassInfo(Field f)

createBasicClassInfo

public TypeClassInfo createBasicClassInfo(Type type)
Description copied from interface: TypeCreator
Create class info for a Type.

Specified by:
createBasicClassInfo in interface TypeCreator
Returns:
info

createTypeForClass

public AegisType createTypeForClass(TypeClassInfo info)
Description copied from interface: TypeCreator
Turn a TypeClassInfo into a type.

Specified by:
createTypeForClass in interface TypeCreator
Returns:

isHolder

protected boolean isHolder(Class javaType)

createHolderType

protected AegisType createHolderType(TypeClassInfo info)

isArray

protected boolean isArray(Class javaType)

createUserType

protected AegisType createUserType(TypeClassInfo info)

createArrayType

protected AegisType createArrayType(TypeClassInfo info)

createQName

protected QName createQName(Class javaType)

isCollection

protected boolean isCollection(Class javaType)

createCollectionTypeFromGeneric

protected AegisType createCollectionTypeFromGeneric(TypeClassInfo info)

getOrCreateGenericType

protected AegisType getOrCreateGenericType(TypeClassInfo info)

getOrCreateMapKeyType

protected AegisType getOrCreateMapKeyType(TypeClassInfo info)

createObjectType

protected AegisType createObjectType()

getOrCreateMapValueType

protected AegisType getOrCreateMapValueType(TypeClassInfo info)

createMapType

protected AegisType createMapType(TypeClassInfo info,
                                  AegisType keyType,
                                  AegisType valueType)

createMapType

protected AegisType createMapType(TypeClassInfo info)

createMapQName

protected QName createMapQName(TypeClassInfo info,
                               AegisType keyType,
                               AegisType valueType)

isMap

protected boolean isMap(Class javaType)

createClassInfo

public abstract TypeClassInfo createClassInfo(PropertyDescriptor pd)

isEnum

protected boolean isEnum(Class javaType)

createEnumType

public AegisType createEnumType(TypeClassInfo info)

createCollectionType

public abstract AegisType createCollectionType(TypeClassInfo info)

createDefaultType

public abstract AegisType createDefaultType(TypeClassInfo info)

createCollectionQName

protected QName createCollectionQName(TypeClassInfo info,
                                      AegisType type)

createClassInfo

public abstract TypeClassInfo createClassInfo(Method m,
                                              int index)
Description copied from interface: TypeCreator
Retrieve the classInfo for a method. Needed to get parameters right.

Specified by:
createClassInfo in interface TypeCreator
Parameters:
m - Method object
index - index in the parameter list
Returns:
info

createType

public AegisType createType(Method m,
                            int index)
Create a AegisType for a Method parameter.

Specified by:
createType in interface TypeCreator
Parameters:
m - the method to create a type for
index - The parameter index. If the index is less than zero, the return type is used.

getElementName

public QName getElementName(Method m,
                            int index)
Description copied from interface: TypeCreator
Get the mapped name of a method parameter.

Specified by:
getElementName in interface TypeCreator
Returns:

createType

public AegisType createType(PropertyDescriptor pd)
Create type information for a PropertyDescriptor.

Specified by:
createType in interface TypeCreator
Parameters:
pd - the propertydescriptor

createType

public AegisType createType(Field f)
Create type information for a Field.

Specified by:
createType in interface TypeCreator
Parameters:
f - the field to create a type from

createType

public AegisType createType(Type t)
Create an Aegis type from a reflected type description. This will only work for the restricted set of collection types supported by Aegis.

Specified by:
createType in interface TypeCreator
Parameters:
t - the reflected type.
Returns:
the type

createType

public AegisType createType(Class clazz)

getConfiguration

public TypeCreationOptions getConfiguration()

setConfiguration

public void setConfiguration(TypeCreationOptions tpConfiguration)

Apache CXF API

Apache CXF