public abstract class Message extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Message.Builder<T extends Message>
Superclass for protocol buffer message builders.
|
static class |
Message.Datatype
A protocol buffer data type.
|
static class |
Message.Label
A protocol buffer label.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
hashCode
If non-zero, the hash code of this message.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Message(Message.Builder builder)
Constructs a Message, initialized with any unknown field data stored in the given
Builder. |
| Modifier and Type | Method and Description |
|---|---|
protected static <T> List<T> |
asList(T... a) |
protected static <T> List<T> |
copyOf(List<T> source)
Utility method to return a mutable copy of a given List.
|
static <E extends Enum> |
enumFromInt(Class<E> enumClass,
int value)
Returns the enumerated value tagged with the given integer value for the
given enum class.
|
protected boolean |
equals(Object a,
Object b) |
int |
getSerializedSize() |
int |
getUnknownFieldsSerializedSize() |
protected static <T> List<T> |
immutableCopyOf(List<T> source)
Utility method to return an immutable copy of a given List.
|
static <E extends Enum> |
intFromEnum(E value)
Returns the integer value tagged associated with the given enum instance.
|
byte[] |
toByteArray() |
String |
toString() |
void |
writeTo(byte[] output) |
void |
writeTo(byte[] output,
int offset,
int count) |
void |
writeUnknownFieldMap(WireOutput output) |
protected transient int hashCode
protected Message(Message.Builder builder)
Builder.protected static <T> List<T> copyOf(List<T> source)
protected static <T> List<T> immutableCopyOf(List<T> source)
public static <E extends Enum> int intFromEnum(E value)
ProtoEnum annotation, an exception
will be thrown.E - the enum class typepublic static <E extends Enum> E enumFromInt(Class<E> enumClass, int value)
ProtoEnum
annotation having the given value, null is returned.E - the enum class typepublic byte[] toByteArray()
public void writeTo(byte[] output)
public void writeTo(byte[] output,
int offset,
int count)
public void writeUnknownFieldMap(WireOutput output) throws IOException
IOExceptionpublic int getSerializedSize()
public int getUnknownFieldsSerializedSize()
protected static <T> List<T> asList(T... a)
Copyright © 2013 Square, Inc.. All Rights Reserved.