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

Author:
Hani Suleiman Date: Jun 14, 2005 Time: 11:59:57 PM

Field Summary
static String HTTP_CXF_APACHE_ORG_ARRAYS
           
protected  AbstractTypeCreator nextCreator
           
protected  TypeMapping tm
           
 
Constructor Summary
AbstractTypeCreator()
           
 
Method Summary
protected  Type createArrayType(TypeClassInfo info)
           
 TypeClassInfo createBasicClassInfo(Class typeClass)
          Retrieve the class info for a class.
 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, Type type)
           
abstract  Type createCollectionType(TypeClassInfo info)
           
protected  Type createCollectionTypeFromGeneric(TypeClassInfo info)
           
abstract  Type createDefaultType(TypeClassInfo info)
           
 Type createEnumType(TypeClassInfo info)
           
protected  Type createHolderType(TypeClassInfo info)
           
protected  QName createMapQName(TypeClassInfo info, Type keyType, Type valueType)
           
protected  Type createMapType(TypeClassInfo info)
           
protected  Type createMapType(TypeClassInfo info, Type keyType, Type valueType)
           
protected  Type createObjectType()
           
protected  QName createQName(Class javaType)
           
 Type createType(Class clazz)
           
 Type createType(Field f)
          Create type information for a Field.
 Type createType(Method m, int index)
          Create a Type for a Method parameter.
 Type createType(PropertyDescriptor pd)
          Create type information for a PropertyDescriptor.
 Type createType(Type t)
          Create an Aegis type from a reflected type description.
 Type createTypeForClass(TypeClassInfo info)
          Turn a TypeClassInfo into a type.
protected  Type createUserType(TypeClassInfo info)
           
 TypeCreationOptions getConfiguration()
           
 QName getElementName(Method m, int index)
          Get the mapped name of a method parameter.
protected  Type getOrCreateGenericType(TypeClassInfo info)
           
protected  Type getOrCreateMapKeyType(TypeClassInfo info)
           
protected  Type 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(Class typeClass)
Description copied from interface: TypeCreator
Retrieve the class info for a class. Needed to get parameters right.

Specified by:
createBasicClassInfo in interface TypeCreator
Returns:
info

createTypeForClass

public Type 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 Type createHolderType(TypeClassInfo info)

isArray

protected boolean isArray(Class javaType)

createUserType

protected Type createUserType(TypeClassInfo info)

createArrayType

protected Type createArrayType(TypeClassInfo info)

createQName

protected QName createQName(Class javaType)

isCollection

protected boolean isCollection(Class javaType)

createCollectionTypeFromGeneric

protected Type createCollectionTypeFromGeneric(TypeClassInfo info)

getOrCreateGenericType

protected Type getOrCreateGenericType(TypeClassInfo info)

getOrCreateMapKeyType

protected Type getOrCreateMapKeyType(TypeClassInfo info)

createObjectType

protected Type createObjectType()

getOrCreateMapValueType

protected Type getOrCreateMapValueType(TypeClassInfo info)

createMapType

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

createMapType

protected Type createMapType(TypeClassInfo info)

createMapQName

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

isMap

protected boolean isMap(Class javaType)

createClassInfo

public abstract TypeClassInfo createClassInfo(PropertyDescriptor pd)

isEnum

protected boolean isEnum(Class javaType)

createEnumType

public Type createEnumType(TypeClassInfo info)

createCollectionType

public abstract Type createCollectionType(TypeClassInfo info)

createDefaultType

public abstract Type createDefaultType(TypeClassInfo info)

createCollectionQName

protected QName createCollectionQName(TypeClassInfo info,
                                      Type 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 Type createType(Method m,
                       int index)
Create a Type 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 Type createType(PropertyDescriptor pd)
Create type information for a PropertyDescriptor.

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

createType

public Type 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 Type 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 Type createType(Class clazz)
Specified by:
createType in interface TypeCreator

getConfiguration

public TypeCreationOptions getConfiguration()

setConfiguration

public void setConfiguration(TypeCreationOptions tpConfiguration)


Apache CXF