Package org.apache.cxf.aegis.type
Class AbstractTypeCreator
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description static StringHTTP_CXF_APACHE_ORG_ARRAYSprotected AbstractTypeCreatornextCreatorprotected TypeMappingtm
-
Constructor Summary
Constructors Constructor Description AbstractTypeCreator()
-
Method Summary
-
-
-
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
-
-
Method Detail
-
getTypeMapping
public TypeMapping getTypeMapping()
-
getTopCreator
public TypeCreator getTopCreator()
-
getParent
public TypeCreator getParent()
- Specified by:
getParentin interfaceTypeCreator
-
setParent
public void setParent(TypeCreator parent)
- Specified by:
setParentin interfaceTypeCreator
-
setTypeMapping
public void setTypeMapping(TypeMapping typeMapping)
- Specified by:
setTypeMappingin interfaceTypeCreator
-
setNextCreator
public void setNextCreator(AbstractTypeCreator creator)
-
createClassInfo
public TypeClassInfo createClassInfo(Field f)
-
createBasicClassInfo
public TypeClassInfo createBasicClassInfo(Type type)
Description copied from interface:TypeCreatorCreate class info for a Type.- Specified by:
createBasicClassInfoin interfaceTypeCreator- Returns:
- info
-
createTypeForClass
public AegisType createTypeForClass(TypeClassInfo info)
Description copied from interface:TypeCreatorTurn a TypeClassInfo into a type.- Specified by:
createTypeForClassin interfaceTypeCreator- 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)
-
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:TypeCreatorRetrieve the classInfo for a method. Needed to get parameters right.- Specified by:
createClassInfoin interfaceTypeCreator- Parameters:
m- Method objectindex- index in the parameter list- Returns:
- info
-
createType
public AegisType createType(Method m, int index)
Create a AegisType for a Method parameter.- Specified by:
createTypein interfaceTypeCreator- Parameters:
m- the method to create a type forindex- 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:TypeCreatorGet the mapped name of a method parameter.- Specified by:
getElementNamein interfaceTypeCreator- Returns:
-
createType
public AegisType createType(PropertyDescriptor pd)
Create type information for a PropertyDescriptor.- Specified by:
createTypein interfaceTypeCreator- Parameters:
pd- the propertydescriptor
-
createType
public AegisType createType(Field f)
Create type information for aField.- Specified by:
createTypein interfaceTypeCreator- 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:
createTypein interfaceTypeCreator- Parameters:
t- the reflected type.- Returns:
- the type
-
getConfiguration
public TypeCreationOptions getConfiguration()
-
setConfiguration
public void setConfiguration(TypeCreationOptions tpConfiguration)
-
-