Module datarush.library
Class AbstractObjectEncoderFactory
- java.lang.Object
-
- com.pervasive.datarush.encoding.binary.AbstractObjectEncoderFactory
-
- All Implemented Interfaces:
EncoderFactory
- Direct Known Subclasses:
AnnotationEncoderFactory,ItemSetEncoderFactory
public abstract class AbstractObjectEncoderFactory extends Object implements EncoderFactory
Base implementation ofEncoderFactoryfor customizing the encoding/decoding ofObjectTokenType. To support a new object type, extend this class rather than implementingEncoderFactorydirectly.
-
-
Constructor Summary
Constructors Constructor Description AbstractObjectEncoderFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanisFactoryForType(TokenType type)Determine if this factory supports the given class type.protected abstract booleanisFactoryForType(Class<?> type)Determine if this factory supports the given class type.TokenDecodernewDecoder(TokenType type)Create a newdecoderinstance for the given type.protected abstract TokenDecodernewDecoder(Class<?> type)Create a new decoder instance for the given type.TokenEncodernewEncoder(TokenType type)Create a newencoderinstance for the given type.protected abstract TokenEncodernewEncoder(Class<?> type)Create a new encoder instance for the given type.
-
-
-
Method Detail
-
isFactoryForType
public final boolean isFactoryForType(TokenType type)
Description copied from interface:EncoderFactoryDetermine if this factory supports the given class type. A factory may support many types.- Specified by:
isFactoryForTypein interfaceEncoderFactory- Parameters:
type- the type to check- Returns:
- true if supported; false otherwise
-
newDecoder
public final TokenDecoder newDecoder(TokenType type)
Description copied from interface:EncoderFactoryCreate a newdecoderinstance for the given type. The type is specified to allow a single factory to serve multiple types.- Specified by:
newDecoderin interfaceEncoderFactory- Parameters:
type- the type which is to be decoded- Returns:
- a new decoder instance
-
newEncoder
public TokenEncoder newEncoder(TokenType type)
Description copied from interface:EncoderFactoryCreate a newencoderinstance for the given type. The type is specified to allow a single factory to serve multiple types.- Specified by:
newEncoderin interfaceEncoderFactory- Parameters:
type- the type which is to be encoded- Returns:
- a new encoder instance
-
isFactoryForType
protected abstract boolean isFactoryForType(Class<?> type)
Determine if this factory supports the given class type. A factory may support many types.- Parameters:
type- the type to check- Returns:
- true if supported; false otherwise
-
newDecoder
protected abstract TokenDecoder newDecoder(Class<?> type)
Create a new decoder instance for the given type. The type is specified to allow a single factory to serve multiple types.- Parameters:
type- the class which is to be decoded- Returns:
- a new encoder instance
-
newEncoder
protected abstract TokenEncoder newEncoder(Class<?> type)
Create a new encoder instance for the given type. The type is specified to allow a single factory to serve multiple types.- Parameters:
type- the class which is to be decoded- Returns:
- a new decoder instance
-
-