Class JavaTypeFactory

java.lang.Object
io.github.astrapi69.json.factory.JavaTypeFactory

public class JavaTypeFactory extends Object
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 Type
    Method
    Description
    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 new JavaType from the given xml mapper, the collection class and the element class
    static com.fasterxml.jackson.databind.JavaType
    newCollectionType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends Collection> collectionClass, Class<?> elementClass)
    Factory method for create a new JavaType from the given xml mapper, the collection class and the element class
    static com.fasterxml.jackson.databind.JavaType
    newCollectionType(Class<? extends Collection> collectionClass, com.fasterxml.jackson.databind.JavaType elementJavaType)
    Factory method for create a new JavaType from the given xml mapper, the collection class and the element class
    static com.fasterxml.jackson.databind.JavaType
    newCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass)
    Factory method for create a new JavaType from the given collection class and the element class
    static <T> com.fasterxml.jackson.databind.JavaType
    newJavaType(com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
    Factory method for create a new JavaType from the given xml mapper with the given type reference
    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 new JavaType from the given xml mapper with the given type reference
    static <T> com.fasterxml.jackson.databind.JavaType
    newJavaType(Class<T> typeClass)
    Factory method for create a new JavaType from the given xml mapper with the given type
    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 new JavaType from the given xml mapper, the map class and the key java type and value java type
    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 new JavaType from the given xml mapper, the map class and the key java type and value java type
    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 new JavaType from the given xml mapper, the map class and the key java type and value java type
    static com.fasterxml.jackson.databind.JavaType
    newMapType(Class<? extends Map> mapClass, Class<?> keyClass, Class<?> valueClass)
    Factory method for create a new JavaType from the given map class and the key java type and value java type
    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 new JavaType from the given xml mapper, the collection class and the element class
    static com.fasterxml.jackson.databind.JavaType
    newParametricType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> parametrized, Class<?>... parameterClasses)
    Factory method for create a new JavaType from the given xml mapper, the collection class and the element class
    static com.fasterxml.jackson.databind.JavaType
    newParametricType(Class<?> parametrized, com.fasterxml.jackson.databind.JavaType... parameterTypes)
    Factory method for create a new JavaType from the given xml mapper, the collection class and the element class
    static com.fasterxml.jackson.databind.JavaType
    newParametricType(Class<?> parametrized, Class<?>... parameterClasses)
    Factory method for create a new JavaType from the given xml mapper, the collection class and the element class
    static <T> com.fasterxml.jackson.core.type.TypeReference<T>
    newTypeReference(Class<T> typeClass)
    Factory method for create a new TypeReference from the given type class

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newParametricType

      public static com.fasterxml.jackson.databind.JavaType newParametricType(Class<?> parametrized, Class<?>... parameterClasses)
      Factory method for create a new JavaType from the given xml mapper, the collection class and the element class
      Parameters:
      parametrized - the class type-erased type to parameterize
      parameterClasses - 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 new JavaType from the given xml mapper, the collection class and the element class
      Parameters:
      objectMapper - the xml mapper
      parametrized - the class type-erased type to parameterize
      parameterClasses - 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 new JavaType from the given xml mapper, the collection class and the element class
      Parameters:
      parametrized - the class type-erased type to parameterize
      parameterTypes - the array with the JavaType 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 new JavaType from the given xml mapper, the collection class and the element class
      Parameters:
      objectMapper - the object mapper
      parametrized - the class type-erased type to parameterize
      parameterTypes - the array with the JavaType 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 new JavaType from the given collection class and the element class
      Parameters:
      collectionClass - the collection class
      elementClass - 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 new JavaType from the given xml mapper, the collection class and the element class
      Parameters:
      objectMapper - the object mapper
      collectionClass - the collection class
      elementClass - 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 new JavaType from the given xml mapper, the collection class and the element class
      Parameters:
      collectionClass - the collection class
      elementJavaType - 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 new JavaType from the given xml mapper, the collection class and the element class
      Parameters:
      objectMapper - the object mapper
      collectionClass - the collection class
      elementJavaType - 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 new JavaType from the given xml mapper, the map class and the key java type and value java type
      Parameters:
      mapClass - the map class
      keyType - the key type
      valueType - 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 new JavaType from the given xml mapper, the map class and the key java type and value java type
      Parameters:
      objectMapper - the object mapper
      mapClass - the map class
      keyType - the key type
      valueType - 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 new JavaType from the given map class and the key java type and value java type
      Parameters:
      mapClass - the map class
      keyClass - the key class
      valueClass - 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 new JavaType from the given xml mapper, the map class and the key java type and value java type
      Parameters:
      objectMapper - the object mapper
      mapClass - the map class
      keyClass - the key class
      valueClass - 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 new JavaType 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 new JavaType from the given xml mapper with the given type reference
      Type Parameters:
      T - the generic type
      Parameters:
      objectMapper - the object mapper
      typeReference - 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 new TypeReference from the given type class
      Type Parameters:
      T - the generic type
      Parameters:
      typeClass - the type class
      Returns:
      the new TypeReference
    • newJavaType

      public static <T> com.fasterxml.jackson.databind.JavaType newJavaType(Class<T> typeClass)
      Factory method for create a new JavaType from the given xml mapper with the given type
      Type Parameters:
      T - the generic type
      Parameters:
      typeClass - the type class
      Returns:
      the new JavaType