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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getQualifiedName
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
@Nonnull public PPrimitiveProvider provider()
public String getProgramName()
PDescriptor
getProgramName
in interface PDescriptor
@Nonnull public String getName()
PDescriptor
getName
in interface PDescriptor
@Nonnull public String getQualifiedName(String programContext)
PDescriptor
getQualifiedName
in interface PDescriptor
programContext
- The program which the type should be referenced from.@Nonnull public PType getType()
getType
in interface PDescriptor
public Object getDefaultValue()
public static PPrimitive findByName(String name)
name
- The name of the primitive.Copyright © 2015–2017 morimekta.net. All rights reserved.