Package org.apache.beam.sdk.schemas
Class FieldValueTypeInformation
java.lang.Object
org.apache.beam.sdk.schemas.FieldValueTypeInformation
- All Implemented Interfaces:
Serializable
Represents type information for a Java type that will be used to infer a Schema type.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldValueTypeInformationforField(@Nullable TypeDescriptor<?> typeDescriptor, Field field, int index) static FieldValueTypeInformationstatic FieldValueTypeInformationforGetter(@Nullable TypeDescriptor<?> typeDescriptor, Method method, int index) static FieldValueTypeInformationforOneOf(String name, boolean nullable, Map<String, FieldValueTypeInformation> oneOfTypes) static FieldValueTypeInformationstatic FieldValueTypeInformationstatic FieldValueTypeInformationforSetter(@Nullable TypeDescriptor<?> typeDescriptor, Method method) static FieldValueTypeInformationforSetter(@Nullable TypeDescriptor<?> typeDescriptor, Method method, String setterPrefix) If the field has a description, returns the description for the field.abstract @Nullable FieldValueTypeInformationIf the field is a container type, returns the element type.getField()static <T extends AnnotatedElement & Member>
@Nullable StringgetFieldDescription(T member) abstract @Nullable FieldValueTypeInformationIf the field is a map type, returns the key type.abstract @Nullable FieldValueTypeInformationIf the field is a map type, returns the key type.abstract StringgetName()Returns the field name.static <T extends AnnotatedElement & Member>
StringgetNameOverride(String original, T member) Optionally returns the field index.static <T extends AnnotatedElement & Member>
intgetNumberOverride(int index, T member) abstract Map<String, FieldValueTypeInformation> abstract Class<?> Returns the raw class type.abstract TypeDescriptor<?> getType()Returns the field type.abstract booleanReturns whether the field is nullable.
-
Constructor Details
-
FieldValueTypeInformation
public FieldValueTypeInformation()
-
-
Method Details
-
getNumber
Optionally returns the field index. -
getName
Returns the field name. -
isNullable
public abstract boolean isNullable()Returns whether the field is nullable. -
getType
Returns the field type. -
getRawType
Returns the raw class type. -
getField
-
getMethod
-
getOneOfTypes
-
getElementType
If the field is a container type, returns the element type. -
getMapKeyType
If the field is a map type, returns the key type. -
getMapValueType
If the field is a map type, returns the key type. -
getDescription
If the field has a description, returns the description for the field. -
forOneOf
public static FieldValueTypeInformation forOneOf(String name, boolean nullable, Map<String, FieldValueTypeInformation> oneOfTypes) -
forField
public static FieldValueTypeInformation forField(@Nullable TypeDescriptor<?> typeDescriptor, Field field, int index) -
getNumberOverride
-
getNameOverride
public static <T extends AnnotatedElement & Member> String getNameOverride(String original, T member) -
getFieldDescription
-
forGetter
-
forGetter
public static FieldValueTypeInformation forGetter(@Nullable TypeDescriptor<?> typeDescriptor, Method method, int index) -
forSetter
-
forSetter
-
forSetter
public static FieldValueTypeInformation forSetter(@Nullable TypeDescriptor<?> typeDescriptor, Method method) -
forSetter
public static FieldValueTypeInformation forSetter(@Nullable TypeDescriptor<?> typeDescriptor, Method method, String setterPrefix) -
withName
-