Annotation Interface PofExtractor
ExtractorBinding annotation representing a PofExtractor.
This annotation can be used to define an extractor that extracts and attribute
from a POF stream based on an array of integer property indices, in which
case the type is optional, or a property path based on serialized field names
concatenated using period (e.g. address.city) in which case the type() attribute must be set as well.
The latter approach can only be used if the specified type is annotated with a
@PortableType annotation and has been instrumented using
PortableTypeGenerator (typically via pof-maven-plugin).
Either index() or path() must be specified within this
annotation in order for it to be valid.
- Since:
- 1.0
- Author:
- Jonathan Knight
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceA holder for the repeatablePofExtractorannotation.static final classAn annotation literal for thePofExtractorannotation. -
Optional Element Summary
Optional Elements
-
Element Details
-
index
int[] indexReturns an array of POF indexes to use to extract the value.- Returns:
- an array of POF indexes to use to extract the value
- Default:
- {}
-
path
String pathReturns a property path to use to extract the value.This attribute can only be used in combination with the
type()attribute, and only if the specified type is annotated with a@PortableTypeannotation and instrumented usingPortableTypeGenerator.- Returns:
- a property path to use to extract the value
- Default:
- ""
-
type
Class<?> typeReturns the root type to extract property from.- Returns:
- the root type to extract property from
- Default:
- java.lang.Object.class
-