public class ThriftField extends Object implements PMessage<ThriftField>, Serializable, Comparable<ThriftField>
Fields without key is assigned values ranging from 65335 and down (2^16-1) in order of appearance. Because of the "in order of appearance" the field *must* be filled by the IDL parser.
Consts are always given the key '0'.
| Modifier and Type | Class and Description |
|---|---|
static class |
ThriftField._Builder |
static class |
ThriftField._Field |
| Modifier and Type | Field and Description |
|---|---|
static PStructDescriptor<ThriftField,ThriftField._Field> |
kDescriptor |
| Constructor and Description |
|---|
ThriftField(String pComment,
int pKey,
Requirement pRequirement,
String pType,
String pName,
String pDefaultValue,
Map<String,String> pAnnotations) |
| Modifier and Type | Method and Description |
|---|---|
String |
asString() |
static ThriftField._Builder |
builder()
Make a model.ThriftField builder.
|
boolean |
compact() |
int |
compareTo(ThriftField other) |
PStructDescriptor<ThriftField,ThriftField._Field> |
descriptor() |
boolean |
equals(Object o) |
Object |
get(int key) |
Map<String,String> |
getAnnotations() |
String |
getComment() |
String |
getDefaultValue() |
int |
getKey() |
String |
getName() |
Requirement |
getRequirement() |
String |
getType() |
boolean |
has(int key) |
boolean |
hasAnnotations() |
boolean |
hasComment() |
boolean |
hasDefaultValue() |
int |
hashCode() |
boolean |
hasKey() |
boolean |
hasName() |
boolean |
hasRequirement() |
boolean |
hasType() |
ThriftField._Builder |
mutate() |
int |
num(int key) |
int |
numAnnotations() |
static PStructDescriptorProvider<ThriftField,ThriftField._Field> |
provider() |
String |
toString() |
public static final PStructDescriptor<ThriftField,ThriftField._Field> kDescriptor
public boolean hasComment()
public String getComment()
public boolean hasKey()
public int getKey()
public boolean hasRequirement()
public Requirement getRequirement()
public boolean hasType()
public String getType()
public boolean hasName()
public String getName()
public boolean hasDefaultValue()
public String getDefaultValue()
public int numAnnotations()
public boolean hasAnnotations()
public boolean has(int key)
has in interface PMessage<ThriftField>public int num(int key)
num in interface PMessage<ThriftField>public Object get(int key)
get in interface PMessage<ThriftField>public boolean compact()
compact in interface PMessage<ThriftField>public String asString()
asString in interface PMessage<ThriftField>asString in interface net.morimekta.util.Stringablepublic int compareTo(ThriftField other)
compareTo in interface Comparable<ThriftField>public static PStructDescriptorProvider<ThriftField,ThriftField._Field> provider()
public PStructDescriptor<ThriftField,ThriftField._Field> descriptor()
descriptor in interface PMessage<ThriftField>descriptor in interface PValue<ThriftField>public ThriftField._Builder mutate()
mutate in interface PMessage<ThriftField>public static ThriftField._Builder builder()
Copyright © 2016. All rights reserved.