public class PPrimitive extends Object implements PDescriptor
These are the basic types used in the thrift structure except containers.
Modifier and Type | Field and Description |
---|---|
static PPrimitive |
BINARY |
static PPrimitive |
BOOL |
static PPrimitive |
BYTE |
static PPrimitive |
DOUBLE |
static PPrimitive |
I16 |
static PPrimitive |
I32 |
static PPrimitive |
I64 |
static PPrimitive |
STRING |
static PPrimitive |
VOID |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static PPrimitive |
findByName(String name)
Find primitive by name.
|
Object |
getDefaultValue() |
String |
getName()
The name of the type is the Identifier string from the IDL.
|
String |
getPackageName()
The package name is derived form the .thrift file name that is parsed or
if read from serialized format is explicit.
|
String |
getQualifiedName(String packageName)
This will return the qualifying name of the type given package context.
|
PType |
getType() |
int |
hashCode() |
PPrimitiveProvider |
provider()
Get the descriptor provider for the primitive.
|
String |
toString() |
public static final PPrimitive VOID
public static final PPrimitive BOOL
public static final PPrimitive BYTE
public static final PPrimitive I16
public static final PPrimitive I32
public static final PPrimitive I64
public static final PPrimitive DOUBLE
public static final PPrimitive STRING
public static final PPrimitive BINARY
public PPrimitiveProvider provider()
public String getPackageName()
PDescriptor
getPackageName
in interface PDescriptor
public String getName()
PDescriptor
getName
in interface PDescriptor
public String getQualifiedName(String packageName)
PDescriptor
getQualifiedName
in interface PDescriptor
packageName
- The package which the name should be referenced from.public PType getType()
getType
in interface PDescriptor
public Object getDefaultValue()
public static PPrimitive findByName(String name)
name
- The name of the primitive.Copyright © 2015–2016 morimekta.net. All rights reserved.