Module datarush.library
Class AnnotationEncoderFactory
- java.lang.Object
- 
- com.pervasive.datarush.encoding.binary.AbstractObjectEncoderFactory
- 
- com.pervasive.datarush.encoding.binary.AnnotationEncoderFactory
 
 
- 
- All Implemented Interfaces:
- EncoderFactory
 
 public class AnnotationEncoderFactory extends AbstractObjectEncoderFactory An encoder factory that works with annotations placed on class methods that mark the methods for getting an encoder and decoder for the class. This is a generic factory that will work with any class that uses the annotations:EncoderandDecoder.Note that the annotated methods must be static as the class cannot be instantiated to obtain the encoder/decoder instances. 
- 
- 
Constructor SummaryConstructors Constructor Description AnnotationEncoderFactory()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisFactoryForType(Class<?> type)Determine if this factory supports the given class type.protected TokenDecodernewDecoder(Class<?> type)Create a new decoder instance for the given type.protected TokenEncodernewEncoder(Class<?> type)Create a new encoder instance for the given type.- 
Methods inherited from class com.pervasive.datarush.encoding.binary.AbstractObjectEncoderFactoryisFactoryForType, newDecoder, newEncoder
 
- 
 
- 
- 
- 
Method Detail- 
isFactoryForTypeprotected boolean isFactoryForType(Class<?> type) Description copied from class:AbstractObjectEncoderFactoryDetermine if this factory supports the given class type. A factory may support many types.- Specified by:
- isFactoryForTypein class- AbstractObjectEncoderFactory
- Parameters:
- type- the type to check
- Returns:
- true if supported; false otherwise
 
 - 
newDecoderprotected TokenDecoder newDecoder(Class<?> type) Description copied from class:AbstractObjectEncoderFactoryCreate a new decoder instance for the given type. The type is specified to allow a single factory to serve multiple types.- Specified by:
- newDecoderin class- AbstractObjectEncoderFactory
- Parameters:
- type- the class which is to be decoded
- Returns:
- a new encoder instance
 
 - 
newEncoderprotected TokenEncoder newEncoder(Class<?> type) Description copied from class:AbstractObjectEncoderFactoryCreate a new encoder instance for the given type. The type is specified to allow a single factory to serve multiple types.- Specified by:
- newEncoderin class- AbstractObjectEncoderFactory
- Parameters:
- type- the class which is to be decoded
- Returns:
- a new decoder instance
 
 
- 
 
-