java.lang.Object
org.proto4j.redis.Extractors
public final class Extractors
extends java.lang.Object
A utility class used to register new
SQLExtractor instances and
get a defined one from the given type.- Since:
- 1.0
- See Also:
RedisExtractor
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExtractors.ListExtractorstatic classExtractors.PrimitiveExtractorstatic classExtractors.RawExtractor -
Method Summary
Modifier and Type Method Description static RedisExtractor<?>getDefinedExtractor(java.lang.Class<?> cls)Returns the definedRedisExtractorfor the given base type.static RedisExtractor<?>getDefinedExtractor(java.lang.Class<?> cls, java.lang.reflect.Type genericType)Returns the definedRedisExtractorfor the given parameterized type.static voidregisterExtractor(RedisExtractor<?> extractor)Registers the given extractor the default ones.
-
Method Details
-
getDefinedExtractor
public static RedisExtractor<?> getDefinedExtractor(java.lang.Class<?> cls, java.lang.reflect.Type genericType)Returns the definedRedisExtractorfor the given parameterized type.- Parameters:
cls- the base type with a generic type declarationgenericType- a parameterized type instance- Returns:
nullif noRedisExtractorinstance could handle the base type, otherwise the corresponding extractor instance.- See Also:
getDefinedExtractor(Class)
-
getDefinedExtractor
Returns the definedRedisExtractorfor the given base type.- Parameters:
cls- the base type with a generic type declaration- Returns:
nullif noRedisExtractorinstance could handle the base type, otherwise the corresponding extractor instance.
-
registerExtractor
Registers the given extractor the default ones.- Parameters:
extractor- The new extractor instance.
-