public class XMLTypeCreator extends AbstractTypeCreator
className.aegis.xml.
For example, given the following service interface:
public Collection getResultsForValues(String id, Collection values); //method 1 public Collection getResultsForValues(int id, Collection values); //method 2 public String getResultForValue(String value); //method 3An example of the type xml is:
<mappings>
<mapping>
<method name="getResultsForValues">
<return-type componentType="com.acme.ResultBean" />
<!-- no need to specify index 0, since it's a String -->
<parameter index="1" componentType="java.lang.String" />
</method>
</mapping>
</mappings>
Note that for values which can be easily deduced (such as the String
parameter, or the second service method) no mapping need be specified in the
xml descriptor, which is why no mapping is specified for method 3.
However, if you have overloaded methods with different semantics, then you
will need to specify enough parameters to disambiguate the method and
uniquely identify it. So in the example above, the mapping specifies will
apply to both method 1 and method 2, since the parameter at index 0 is not
specified.HTTP_CXF_APACHE_ORG_ARRAYS, nextCreator, tm| Constructor and Description |
|---|
XMLTypeCreator() |
| Modifier and Type | Method and Description |
|---|---|
TypeClassInfo |
createClassInfo(Method m,
int index)
Retrieve the classInfo for a method.
|
TypeClassInfo |
createClassInfo(PropertyDescriptor pd) |
AegisType |
createCollectionType(TypeClassInfo info) |
AegisType |
createDefaultType(TypeClassInfo info) |
AegisType |
createEnumType(TypeClassInfo info) |
protected QName |
createQName(Element e,
String value)
Creates a QName from a string, such as "ns:Element".
|
protected Element |
findMapping(Type type) |
protected List<Element> |
findMappings(Type type) |
protected Document |
getDocument(Class<?> clazz) |
protected AegisType |
getOrCreateGenericType(TypeClassInfo info) |
protected AegisType |
getOrCreateMapKeyType(TypeClassInfo info) |
protected AegisType |
getOrCreateMapValueType(TypeClassInfo info) |
protected boolean |
isEnum(Class<?> javaType) |
protected void |
readMetadata(TypeClassInfo info,
Element mapping,
Element parameter) |
protected void |
setType(TypeClassInfo info,
Element parameter) |
createArrayType, createBasicClassInfo, createClassInfo, createCollectionQName, createCollectionTypeFromGeneric, createHolderType, createMapQName, createMapType, createMapType, createObjectType, createQName, createType, createType, createType, createType, createType, createTypeForClass, createUserType, getConfiguration, getElementName, getParent, getTopCreator, getTypeMapping, isArray, isCollection, isHolder, isMap, setConfiguration, setNextCreator, setParent, setTypeMappingprotected boolean isEnum(Class<?> javaType)
isEnum in class AbstractTypeCreatorpublic AegisType createEnumType(TypeClassInfo info)
createEnumType in class AbstractTypeCreatorpublic AegisType createCollectionType(TypeClassInfo info)
createCollectionType in class AbstractTypeCreatorpublic TypeClassInfo createClassInfo(PropertyDescriptor pd)
createClassInfo in class AbstractTypeCreatorpublic AegisType createDefaultType(TypeClassInfo info)
createDefaultType in class AbstractTypeCreatorpublic TypeClassInfo createClassInfo(Method m, int index)
TypeCreatorcreateClassInfo in interface TypeCreatorcreateClassInfo in class AbstractTypeCreatorm - Method objectindex - index in the parameter listprotected void readMetadata(TypeClassInfo info, Element mapping, Element parameter)
protected AegisType getOrCreateGenericType(TypeClassInfo info)
getOrCreateGenericType in class AbstractTypeCreatorprotected AegisType getOrCreateMapKeyType(TypeClassInfo info)
getOrCreateMapKeyType in class AbstractTypeCreatorprotected AegisType getOrCreateMapValueType(TypeClassInfo info)
getOrCreateMapValueType in class AbstractTypeCreatorprotected void setType(TypeClassInfo info, Element parameter)
Apache CXF