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 class
Extractors.ListExtractor
static class
Extractors.PrimitiveExtractor
static class
Extractors.RawExtractor
-
Method Summary
Modifier and Type Method Description static RedisExtractor<?>
getDefinedExtractor(java.lang.Class<?> cls)
Returns the definedRedisExtractor
for the given base type.static RedisExtractor<?>
getDefinedExtractor(java.lang.Class<?> cls, java.lang.reflect.Type genericType)
Returns the definedRedisExtractor
for the given parameterized type.static void
registerExtractor(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 definedRedisExtractor
for the given parameterized type.- Parameters:
cls
- the base type with a generic type declarationgenericType
- a parameterized type instance- Returns:
null
if noRedisExtractor
instance could handle the base type, otherwise the corresponding extractor instance.- See Also:
getDefinedExtractor(Class)
-
getDefinedExtractor
Returns the definedRedisExtractor
for the given base type.- Parameters:
cls
- the base type with a generic type declaration- Returns:
null
if noRedisExtractor
instance could handle the base type, otherwise the corresponding extractor instance.
-
registerExtractor
Registers the given extractor the default ones.- Parameters:
extractor
- The new extractor instance.
-