Class Extractors

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
  • Method Details

    • getDefinedExtractor

      public static RedisExtractor<?> getDefinedExtractor​(java.lang.Class<?> cls, java.lang.reflect.Type genericType)
      Returns the defined RedisExtractor for the given parameterized type.
      Parameters:
      cls - the base type with a generic type declaration
      genericType - a parameterized type instance
      Returns:
      null if no RedisExtractor instance could handle the base type, otherwise the corresponding extractor instance.
      See Also:
      getDefinedExtractor(Class)
    • getDefinedExtractor

      public static RedisExtractor<?> getDefinedExtractor​(java.lang.Class<?> cls)
      Returns the defined RedisExtractor for the given base type.
      Parameters:
      cls - the base type with a generic type declaration
      Returns:
      null if no RedisExtractor instance could handle the base type, otherwise the corresponding extractor instance.
    • registerExtractor

      public static void registerExtractor​(RedisExtractor<?> extractor)
      Registers the given extractor the default ones.
      Parameters:
      extractor - The new extractor instance.