public static class PApplicationException._Builder extends PMessageBuilder<PApplicationException,PApplicationException._Field> implements BinaryReader
Constructor and Description |
---|
_Builder()
Make a pservice.PApplicationException builder instance.
|
_Builder(PApplicationException base)
Make a mutating builder off a base pservice.PApplicationException.
|
Modifier and Type | Method and Description |
---|---|
PApplicationException._Builder |
addTo(int key,
Object value)
Adds a value to a set or list container.
|
PApplicationException |
build()
Build the instance value.
|
PApplicationException._Builder |
clear(int key)
Clear the provided field value.
|
PApplicationException._Builder |
clearId()
Clear the
id field. |
PApplicationException._Builder |
clearMessage()
Clear the
message field. |
PExceptionDescriptor<PApplicationException,PApplicationException._Field> |
descriptor()
Get the descriptor for the message being built.
|
boolean |
equals(Object o) |
PApplicationExceptionType |
getId()
The application exception type.
|
String |
getMessage()
Exception message.
|
int |
hashCode() |
PApplicationException._Builder |
initCause(Throwable cause)
Initializes the cause of the pservice.PApplicationException
|
boolean |
isModified(int key)
Checks if a specific field is modified on the builder.
|
boolean |
isModifiedId()
Checks if the
id field has been modified since the
builder was created. |
boolean |
isModifiedMessage()
Checks if the
message field has been modified since the
builder was created. |
boolean |
isSet(int key)
Checks if a specific field is set on the builder.
|
boolean |
isSetId()
Checks for presence of the
id field. |
boolean |
isSetMessage()
Checks for presence of the
message field. |
PApplicationException._Builder |
merge(PApplicationException from)
Merges the provided message into the builder.
|
PMessageBuilder |
mutator(int key)
Get the builder for the given message contained in this builder.
|
void |
readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict)
Read the binary content into the current builder.
|
PApplicationException._Builder |
set(int key,
Object value)
Set the provided field value.
|
PApplicationException._Builder |
setId(PApplicationExceptionType value)
Set the
id field value. |
PApplicationException._Builder |
setMessage(String value)
Set the
message field value. |
boolean |
valid()
Checks if the current set data is enough to make a valid struct.
|
void |
validate()
Checks if the current set data is enough to make a valid struct.
|
addTo, clear, isModified, isSet, modifiedFields, mutator, presentFields, set
public _Builder()
public _Builder(PApplicationException base)
base
- The base PApplicationException@Nonnull public PApplicationException._Builder merge(PApplicationException from)
PMessageBuilder
merge
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
from
- The message to merge values from.@Nonnull public PApplicationException._Builder setMessage(String value)
message
field value.
Exception message.
value
- The new valuepublic boolean isSetMessage()
message
field.public boolean isModifiedMessage()
message
field has been modified since the
builder was created.@Nonnull public PApplicationException._Builder clearMessage()
message
field.public String getMessage()
message
field value@Nonnull public PApplicationException._Builder setId(PApplicationExceptionType value)
id
field value.
The application exception type.
value
- The new valuepublic boolean isSetId()
id
field.public boolean isModifiedId()
id
field has been modified since the
builder was created.@Nonnull public PApplicationException._Builder clearId()
id
field.public PApplicationExceptionType getId()
id
field value@Nonnull public PApplicationException._Builder initCause(Throwable cause)
cause
- The causepublic PMessageBuilder mutator(int key)
PMessageBuilder
mutator
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
key
- The field key.@Nonnull public PApplicationException._Builder set(int key, Object value)
PMessageBuilder
set
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
key
- The key of the field to set.value
- The value to be set.public boolean isSet(int key)
PMessageBuilder
isSet
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
key
- The key of the field to check.public boolean isModified(int key)
PMessageBuilder
isModified
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
key
- The key of the field to check.public PApplicationException._Builder addTo(int key, Object value)
PMessageBuilder
addTo
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
key
- The key of the container field to add too.value
- The value to add.@Nonnull public PApplicationException._Builder clear(int key)
PMessageBuilder
clear
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
key
- The key of the field to clear.public boolean valid()
PMessageBuilder
valid
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
public void validate()
PMessageBuilder
IllegalStateException
with an appropriate error
message.validate
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
@Nonnull public PExceptionDescriptor<PApplicationException,PApplicationException._Field> descriptor()
PMessageBuilder
descriptor
in class PMessageBuilder<PApplicationException,PApplicationException._Field>
public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict) throws IOException
BinaryReader
BinarySerializer.deserialize(InputStream, PMessageDescriptor)
call.readBinary
in interface BinaryReader
reader
- The reader to read from.strict
- If content should be handled strictly. True means to fail
on everything that Apache thrift failed read() on.IOException
- When unable to read message for any reason.public PApplicationException build()
PBuilder
build
in interface PBuilder<PApplicationException>
Copyright © 2015–2018 morimekta.net. All rights reserved.