public class CustomCollections extends Object
Constructor and Description |
---|
CustomCollections() |
Modifier and Type | Method and Description |
---|---|
static Set<Class<?>> |
getCustomTypes()
Returns all custom collection and map types.
|
static Class<?> |
getMapBaseType(Class<?> type)
Returns the map base type for the given type, i.e. the one that's considered the logical map interface (
Map
for HashMap etc.). |
static Set<Class<?>> |
getPaginationReturnTypes()
Returns all types that are allowed pagination return types.
|
static Set<Function<Object,Object>> |
getUnwrappers()
Returns all unwrapper functions that transform the custom collections into Java-native ones.
|
static boolean |
isCollection(Class<?> type)
Returns whether the given type is considered a
Collection type. |
static boolean |
isMap(Class<?> type)
Returns whether the given type is considered a
Map type. |
static boolean |
isMapBaseType(Class<?> type)
Returns whether the given type is a map base type.
|
static void |
registerConvertersIn(ConverterRegistry registry)
Registers all converters to transform Java-native collections into custom ones and back in the given
ConverterRegistry . |
public static Set<Class<?>> getCustomTypes()
public static Set<Class<?>> getPaginationReturnTypes()
public static boolean isMapBaseType(Class<?> type)
type
- must not be null.public static Class<?> getMapBaseType(Class<?> type) throws IllegalArgumentException
Map
for HashMap
etc.).type
- must not be null.IllegalArgumentException
- in case we do not find a map base type for the given one.public static boolean isMap(Class<?> type)
Map
type.type
- must not be null.public static boolean isCollection(Class<?> type)
Collection
type.type
- must not be null.public static Set<Function<Object,Object>> getUnwrappers()
public static void registerConvertersIn(ConverterRegistry registry)
ConverterRegistry
.registry
- must not be null.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.