Class FieldAccessorFactory
java.lang.Object
org.apache.flink.streaming.util.typeutils.FieldAccessorFactory
- All Implemented Interfaces:
Serializable
Static factories for the
FieldAccessor utilities.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,F> FieldAccessor<T, F> getAccessor(org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo, int pos, org.apache.flink.api.common.ExecutionConfig config) Creates aFieldAccessorfor the given field position, which can be used to get and set the specified field on instances of this type.static <T,F> FieldAccessor<T, F> getAccessor(org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo, String field, org.apache.flink.api.common.ExecutionConfig config) Creates aFieldAccessorfor the field that is given by a field expression, which can be used to get and set the specified field on instances of this type.
-
Constructor Details
-
FieldAccessorFactory
public FieldAccessorFactory()
-
-
Method Details
-
getAccessor
@Internal public static <T,F> FieldAccessor<T,F> getAccessor(org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo, int pos, org.apache.flink.api.common.ExecutionConfig config) Creates aFieldAccessorfor the given field position, which can be used to get and set the specified field on instances of this type.- Type Parameters:
F- The type of the field to access- Parameters:
pos- The field position (zero-based)config- Configuration object- Returns:
- The created FieldAccessor
-
getAccessor
@Internal public static <T,F> FieldAccessor<T,F> getAccessor(org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInfo, String field, org.apache.flink.api.common.ExecutionConfig config) Creates aFieldAccessorfor the field that is given by a field expression, which can be used to get and set the specified field on instances of this type.- Type Parameters:
F- The type of the field to access- Parameters:
field- The field expressionconfig- Configuration object- Returns:
- The created FieldAccessor
-