Package org.springframework.data.util
Class CustomCollections
java.lang.Object
org.springframework.data.util.CustomCollections
Central API to expose information about custom collections present for Spring Data. Exposes custom collection and map
 types and registers converters to convert them from and to Java-native collections.
- Since:
- 2.7
- Author:
- Oliver Drotbohm
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns 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 (MapforHashMapetc.).Returns all types that are allowed pagination return types.Returns all unwrapper functions that transform the custom collections into Java-native ones.static booleanisCollection(Class<?> type) Returns whether the given type is considered aCollectiontype.static booleanReturns whether the given type is considered aMaptype.static booleanisMapBaseType(Class<?> type) Returns whether the given type is a map base type.static voidregisterConvertersIn(ConverterRegistry registry) Registers all converters to transform Java-native collections into custom ones and back in the givenConverterRegistry.
- 
Constructor Details- 
CustomCollectionspublic CustomCollections()
 
- 
- 
Method Details- 
getCustomTypesReturns all custom collection and map types.- Returns:
- will never be null.
 
- 
getPaginationReturnTypesReturns all types that are allowed pagination return types.- Returns:
- will never be null.
 
- 
isMapBaseTypeReturns whether the given type is a map base type.- Parameters:
- type- must not be null.
- Returns:
- will never be null.
 
- 
getMapBaseTypeReturns the map base type for the given type, i.e. the one that's considered the logical map interface (MapforHashMapetc.).- Parameters:
- type- must not be null.
- Returns:
- will never be null.
- Throws:
- IllegalArgumentException- in case we do not find a map base type for the given one.
 
- 
isMapReturns whether the given type is considered aMaptype.- Parameters:
- type- must not be null.
- Returns:
- will never be null.
 
- 
isCollectionReturns whether the given type is considered aCollectiontype.- Parameters:
- type- must not be null.
- Returns:
- will never be null.
 
- 
getUnwrappersReturns all unwrapper functions that transform the custom collections into Java-native ones.- Returns:
- will never be null.
 
- 
registerConvertersInRegisters all converters to transform Java-native collections into custom ones and back in the givenConverterRegistry.- Parameters:
- registry- must not be null.
 
 
-