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 |
getProgramName()
The package name is derived form the .thrift file name that is parsed or
if read from serialized format is explicit.
|
String |
getQualifiedName(String programContext)
This will return the qualified name of the type given the program 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 getProgramName()
PDescriptorgetProgramName in interface PDescriptorpublic String getName()
PDescriptorgetName in interface PDescriptorpublic String getQualifiedName(String programContext)
PDescriptorgetQualifiedName in interface PDescriptorprogramContext - The program which the type should be referenced from.public PType getType()
getType in interface PDescriptorpublic Object getDefaultValue()
public static PPrimitive findByName(String name)
name - The name of the primitive.Copyright © 2015–2016 morimekta.net. All rights reserved.