Package org.stellar.sdk.xdr
Class SCSpecTypeDef
java.lang.Object
org.stellar.sdk.xdr.SCSpecTypeDef
- All Implemented Interfaces:
XdrElement
SCSpecTypeDef's original definition in the XDR file is:
union SCSpecTypeDef switch (SCSpecType type)
{
case SC_SPEC_TYPE_VAL:
case SC_SPEC_TYPE_BOOL:
case SC_SPEC_TYPE_VOID:
case SC_SPEC_TYPE_ERROR:
case SC_SPEC_TYPE_U32:
case SC_SPEC_TYPE_I32:
case SC_SPEC_TYPE_U64:
case SC_SPEC_TYPE_I64:
case SC_SPEC_TYPE_TIMEPOINT:
case SC_SPEC_TYPE_DURATION:
case SC_SPEC_TYPE_U128:
case SC_SPEC_TYPE_I128:
case SC_SPEC_TYPE_U256:
case SC_SPEC_TYPE_I256:
case SC_SPEC_TYPE_BYTES:
case SC_SPEC_TYPE_STRING:
case SC_SPEC_TYPE_SYMBOL:
case SC_SPEC_TYPE_ADDRESS:
case SC_SPEC_TYPE_MUXED_ADDRESS:
void;
case SC_SPEC_TYPE_OPTION:
SCSpecTypeOption option;
case SC_SPEC_TYPE_RESULT:
SCSpecTypeResult result;
case SC_SPEC_TYPE_VEC:
SCSpecTypeVec vec;
case SC_SPEC_TYPE_MAP:
SCSpecTypeMap map;
case SC_SPEC_TYPE_TUPLE:
SCSpecTypeTuple tuple;
case SC_SPEC_TYPE_BYTES_N:
SCSpecTypeBytesN bytesN;
case SC_SPEC_TYPE_UDT:
SCSpecTypeUDT udt;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSCSpecTypeDef(SCSpecType discriminant, SCSpecTypeOption option, SCSpecTypeResult result, SCSpecTypeVec vec, SCSpecTypeMap map, SCSpecTypeTuple tuple, SCSpecTypeBytesN bytesN, SCSpecTypeUDT udt) Creates a newSCSpecTypeDefinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SCSpecTypeDefdecode(XdrDataInputStream stream) static SCSpecTypeDefdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SCSpecTypeDefstatic SCSpecTypeDeffromXdrBase64(String xdr) static SCSpecTypeDeffromXdrByteArray(byte[] xdr) Value of thebytesNfield.Value of thediscriminantfield.getMap()Value of themapfield.Value of theoptionfield.Value of theresultfield.getTuple()Value of thetuplefield.getUdt()Value of theudtfield.getVec()Value of thevecfield.inthashCode()voidsetBytesN(SCSpecTypeBytesN bytesN) Value of thebytesNfield.voidsetDiscriminant(SCSpecType discriminant) Value of thediscriminantfield.voidsetMap(SCSpecTypeMap map) Value of themapfield.voidsetOption(SCSpecTypeOption option) Value of theoptionfield.voidsetResult(SCSpecTypeResult result) Value of theresultfield.voidsetTuple(SCSpecTypeTuple tuple) Value of thetuplefield.voidsetUdt(SCSpecTypeUDT udt) Value of theudtfield.voidsetVec(SCSpecTypeVec vec) Value of thevecfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCSpecTypeDef
public SCSpecTypeDef() -
SCSpecTypeDef
public SCSpecTypeDef(SCSpecType discriminant, SCSpecTypeOption option, SCSpecTypeResult result, SCSpecTypeVec vec, SCSpecTypeMap map, SCSpecTypeTuple tuple, SCSpecTypeBytesN bytesN, SCSpecTypeUDT udt) Creates a newSCSpecTypeDefinstance.- Parameters:
discriminant- thediscriminantfield valueoption- theoptionfield valueresult- theresultfield valuevec- thevecfield valuemap- themapfield valuetuple- thetuplefield valuebytesN- thebytesNfield valueudt- theudtfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getDiscriminant
Value of thediscriminantfield.- Returns:
- the
discriminantfield value
-
getOption
Value of theoptionfield.- Returns:
- the
optionfield value
-
getResult
Value of theresultfield.- Returns:
- the
resultfield value
-
getVec
Value of thevecfield.- Returns:
- the
vecfield value
-
getMap
Value of themapfield.- Returns:
- the
mapfield value
-
getTuple
Value of thetuplefield.- Returns:
- the
tuplefield value
-
getBytesN
Value of thebytesNfield.- Returns:
- the
bytesNfield value
-
getUdt
Value of theudtfield.- Returns:
- the
udtfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setOption
Value of theoptionfield.- Parameters:
option- theoptionfield value
-
setResult
Value of theresultfield.- Parameters:
result- theresultfield value
-
setVec
Value of thevecfield.- Parameters:
vec- thevecfield value
-
setMap
Value of themapfield.- Parameters:
map- themapfield value
-
setTuple
Value of thetuplefield.- Parameters:
tuple- thetuplefield value
-
setBytesN
Value of thebytesNfield.- Parameters:
bytesN- thebytesNfield value
-
setUdt
Value of theudtfield.- Parameters:
udt- theudtfield value
-
equals
-
hashCode
public int hashCode() -
toString
-