java.lang.Object
io.github.astrapi69.json.factory.JavaTypeFactory
The factory class
JavaTypeFactory
for creating JavaType
objects for serializing
java collection beans to xml string and deserialize xml string to java collection beans-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.JavaType
newCollectionType
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Collection> collectionClass, com.fasterxml.jackson.databind.JavaType elementJavaType) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element classstatic com.fasterxml.jackson.databind.JavaType
newCollectionType
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Collection> collectionClass, Class<?> elementClass) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element classstatic com.fasterxml.jackson.databind.JavaType
newCollectionType
(Class<? extends Collection> collectionClass, com.fasterxml.jackson.databind.JavaType elementJavaType) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element classstatic com.fasterxml.jackson.databind.JavaType
newCollectionType
(Class<? extends Collection> collectionClass, Class<?> elementClass) Factory method for create a newJavaType
from the given collection class and the element classstatic <T> com.fasterxml.jackson.databind.JavaType
newJavaType
(com.fasterxml.jackson.core.type.TypeReference<T> typeReference) Factory method for create a newJavaType
from the given xml mapper with the given type referencestatic <T> com.fasterxml.jackson.databind.JavaType
newJavaType
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) Factory method for create a newJavaType
from the given xml mapper with the given type referencestatic <T> com.fasterxml.jackson.databind.JavaType
newJavaType
(Class<T> typeClass) Factory method for create a newJavaType
from the given xml mapper with the given typestatic com.fasterxml.jackson.databind.JavaType
newMapType
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Map> mapClass, com.fasterxml.jackson.databind.JavaType keyType, com.fasterxml.jackson.databind.JavaType valueType) Factory method for create a newJavaType
from the given xml mapper, the map class and the key java type and value java typestatic com.fasterxml.jackson.databind.JavaType
newMapType
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Map> mapClass, Class<?> keyClass, Class<?> valueClass) Factory method for create a newJavaType
from the given xml mapper, the map class and the key java type and value java typestatic com.fasterxml.jackson.databind.JavaType
newMapType
(Class<? extends Map> mapClass, com.fasterxml.jackson.databind.JavaType keyType, com.fasterxml.jackson.databind.JavaType valueType) Factory method for create a newJavaType
from the given xml mapper, the map class and the key java type and value java typestatic com.fasterxml.jackson.databind.JavaType
newMapType
(Class<? extends Map> mapClass, Class<?> keyClass, Class<?> valueClass) Factory method for create a newJavaType
from the given map class and the key java type and value java typestatic com.fasterxml.jackson.databind.JavaType
newParametricType
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> parametrized, com.fasterxml.jackson.databind.JavaType... parameterTypes) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element classstatic com.fasterxml.jackson.databind.JavaType
newParametricType
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> parametrized, Class<?>... parameterClasses) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element classstatic com.fasterxml.jackson.databind.JavaType
newParametricType
(Class<?> parametrized, com.fasterxml.jackson.databind.JavaType... parameterTypes) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element classstatic com.fasterxml.jackson.databind.JavaType
newParametricType
(Class<?> parametrized, Class<?>... parameterClasses) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element classstatic <T> com.fasterxml.jackson.core.type.TypeReference<T>
newTypeReference
(Class<T> typeClass) Factory method for create a newTypeReference
from the given type class
-
Method Details
-
newParametricType
public static com.fasterxml.jackson.databind.JavaType newParametricType(Class<?> parametrized, Class<?>... parameterClasses) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element class- Parameters:
parametrized
- the class type-erased type to parameterizeparameterClasses
- the array with the type parameters to apply- Returns:
- the new
JavaType
-
newParametricType
public static com.fasterxml.jackson.databind.JavaType newParametricType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> parametrized, Class<?>... parameterClasses) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element class- Parameters:
objectMapper
- the xml mapperparametrized
- the class type-erased type to parameterizeparameterClasses
- the array with the type parameters to apply- Returns:
- the new
JavaType
-
newParametricType
public static com.fasterxml.jackson.databind.JavaType newParametricType(Class<?> parametrized, com.fasterxml.jackson.databind.JavaType... parameterTypes) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element class- Parameters:
parametrized
- the class type-erased type to parameterizeparameterTypes
- the array with theJavaType
to apply- Returns:
- the new
JavaType
-
newParametricType
public static com.fasterxml.jackson.databind.JavaType newParametricType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> parametrized, com.fasterxml.jackson.databind.JavaType... parameterTypes) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element class- Parameters:
objectMapper
- the object mapperparametrized
- the class type-erased type to parameterizeparameterTypes
- the array with theJavaType
to apply- Returns:
- the new
JavaType
-
newCollectionType
public static com.fasterxml.jackson.databind.JavaType newCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass) Factory method for create a newJavaType
from the given collection class and the element class- Parameters:
collectionClass
- the collection classelementClass
- the element class- Returns:
- the new
JavaType
-
newCollectionType
public static com.fasterxml.jackson.databind.JavaType newCollectionType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Collection> collectionClass, Class<?> elementClass) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element class- Parameters:
objectMapper
- the object mappercollectionClass
- the collection classelementClass
- the element class- Returns:
- the new
JavaType
-
newCollectionType
public static com.fasterxml.jackson.databind.JavaType newCollectionType(Class<? extends Collection> collectionClass, com.fasterxml.jackson.databind.JavaType elementJavaType) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element class- Parameters:
collectionClass
- the collection classelementJavaType
- the element type- Returns:
- the new
JavaType
-
newCollectionType
public static com.fasterxml.jackson.databind.JavaType newCollectionType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Collection> collectionClass, com.fasterxml.jackson.databind.JavaType elementJavaType) Factory method for create a newJavaType
from the given xml mapper, the collection class and the element class- Parameters:
objectMapper
- the object mappercollectionClass
- the collection classelementJavaType
- the element type- Returns:
- the new
JavaType
-
newMapType
public static com.fasterxml.jackson.databind.JavaType newMapType(Class<? extends Map> mapClass, com.fasterxml.jackson.databind.JavaType keyType, com.fasterxml.jackson.databind.JavaType valueType) Factory method for create a newJavaType
from the given xml mapper, the map class and the key java type and value java type- Parameters:
mapClass
- the map classkeyType
- the key typevalueType
- the value type- Returns:
- the new
JavaType
-
newMapType
public static com.fasterxml.jackson.databind.JavaType newMapType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Map> mapClass, com.fasterxml.jackson.databind.JavaType keyType, com.fasterxml.jackson.databind.JavaType valueType) Factory method for create a newJavaType
from the given xml mapper, the map class and the key java type and value java type- Parameters:
objectMapper
- the object mappermapClass
- the map classkeyType
- the key typevalueType
- the value type- Returns:
- the new
JavaType
-
newMapType
public static com.fasterxml.jackson.databind.JavaType newMapType(Class<? extends Map> mapClass, Class<?> keyClass, Class<?> valueClass) Factory method for create a newJavaType
from the given map class and the key java type and value java type- Parameters:
mapClass
- the map classkeyClass
- the key classvalueClass
- the value class- Returns:
- the new
JavaType
-
newMapType
public static com.fasterxml.jackson.databind.JavaType newMapType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Map> mapClass, Class<?> keyClass, Class<?> valueClass) Factory method for create a newJavaType
from the given xml mapper, the map class and the key java type and value java type- Parameters:
objectMapper
- the object mappermapClass
- the map classkeyClass
- the key classvalueClass
- the value class- Returns:
- the new
JavaType
-
newJavaType
public static <T> com.fasterxml.jackson.databind.JavaType newJavaType(com.fasterxml.jackson.core.type.TypeReference<T> typeReference) Factory method for create a newJavaType
from the given xml mapper with the given type reference- Type Parameters:
T
- the generic type- Parameters:
typeReference
- the type reference- Returns:
- the new
JavaType
-
newJavaType
public static <T> com.fasterxml.jackson.databind.JavaType newJavaType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) Factory method for create a newJavaType
from the given xml mapper with the given type reference- Type Parameters:
T
- the generic type- Parameters:
objectMapper
- the object mappertypeReference
- the type reference- Returns:
- the new
JavaType
-
newTypeReference
public static <T> com.fasterxml.jackson.core.type.TypeReference<T> newTypeReference(Class<T> typeClass) Factory method for create a newTypeReference
from the given type class- Type Parameters:
T
- the generic type- Parameters:
typeClass
- the type class- Returns:
- the new
TypeReference
-
newJavaType
Factory method for create a newJavaType
from the given xml mapper with the given type- Type Parameters:
T
- the generic type- Parameters:
typeClass
- the type class- Returns:
- the new
JavaType
-