Package org.apache.thrift.partial
Class ThriftField
java.lang.Object
org.apache.thrift.partial.ThriftField
Holds name of a thrift field and of its sub-fields recursively.
This class is meant to be used in conjunction with TDeserializer
.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<ThriftField>
List of sub-fields of this field.final String
Name of this field as it appears in a thrift file. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static List<ThriftField>
fromNames
(Collection<String> fieldNames) Generates and returns n-ary tree of fields and their sub-fields.int
hashCode()
toString()
-
Field Details
-
name
Name of this field as it appears in a thrift file. Case sensitive. -
fields
List of sub-fields of this field.This list should have only those sub-fields that need to be deserialized by the
TDeserializer
.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
getFieldNames
-
fromNames
Generates and returns n-ary tree of fields and their sub-fields.- Parameters:
fieldNames
- collection of fully qualified field names.for example, In case of PinJoin thrift struct, the following are valid field names -- signature -- pins.user.userId -- textSignal.termSignal.termDataMap
- Returns:
- n-ary tree of fields and their sub-fields.
-