Package org.stellar.sdk.xdr
Class SCSpecEntry
java.lang.Object
org.stellar.sdk.xdr.SCSpecEntry
- All Implemented Interfaces:
XdrElement
SCSpecEntry's original definition in the XDR file is:
union SCSpecEntry switch (SCSpecEntryKind kind)
{
case SC_SPEC_ENTRY_FUNCTION_V0:
SCSpecFunctionV0 functionV0;
case SC_SPEC_ENTRY_UDT_STRUCT_V0:
SCSpecUDTStructV0 udtStructV0;
case SC_SPEC_ENTRY_UDT_UNION_V0:
SCSpecUDTUnionV0 udtUnionV0;
case SC_SPEC_ENTRY_UDT_ENUM_V0:
SCSpecUDTEnumV0 udtEnumV0;
case SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0:
SCSpecUDTErrorEnumV0 udtErrorEnumV0;
case SC_SPEC_ENTRY_EVENT_V0:
SCSpecEventV0 eventV0;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSCSpecEntry(SCSpecEntryKind discriminant, SCSpecFunctionV0 functionV0, SCSpecUDTStructV0 udtStructV0, SCSpecUDTUnionV0 udtUnionV0, SCSpecUDTEnumV0 udtEnumV0, SCSpecUDTErrorEnumV0 udtErrorEnumV0, SCSpecEventV0 eventV0) Creates a newSCSpecEntryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SCSpecEntrydecode(XdrDataInputStream stream) static SCSpecEntrydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SCSpecEntrystatic SCSpecEntryfromXdrBase64(String xdr) static SCSpecEntryfromXdrByteArray(byte[] xdr) Value of thediscriminantfield.Value of theeventV0field.Value of thefunctionV0field.Value of theudtEnumV0field.Value of theudtErrorEnumV0field.Value of theudtStructV0field.Value of theudtUnionV0field.inthashCode()voidsetDiscriminant(SCSpecEntryKind discriminant) Value of thediscriminantfield.voidsetEventV0(SCSpecEventV0 eventV0) Value of theeventV0field.voidsetFunctionV0(SCSpecFunctionV0 functionV0) Value of thefunctionV0field.voidsetUdtEnumV0(SCSpecUDTEnumV0 udtEnumV0) Value of theudtEnumV0field.voidsetUdtErrorEnumV0(SCSpecUDTErrorEnumV0 udtErrorEnumV0) Value of theudtErrorEnumV0field.voidsetUdtStructV0(SCSpecUDTStructV0 udtStructV0) Value of theudtStructV0field.voidsetUdtUnionV0(SCSpecUDTUnionV0 udtUnionV0) Value of theudtUnionV0field.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCSpecEntry
public SCSpecEntry() -
SCSpecEntry
public SCSpecEntry(SCSpecEntryKind discriminant, SCSpecFunctionV0 functionV0, SCSpecUDTStructV0 udtStructV0, SCSpecUDTUnionV0 udtUnionV0, SCSpecUDTEnumV0 udtEnumV0, SCSpecUDTErrorEnumV0 udtErrorEnumV0, SCSpecEventV0 eventV0) Creates a newSCSpecEntryinstance.- Parameters:
discriminant- thediscriminantfield valuefunctionV0- thefunctionV0field valueudtStructV0- theudtStructV0field valueudtUnionV0- theudtUnionV0field valueudtEnumV0- theudtEnumV0field valueudtErrorEnumV0- theudtErrorEnumV0field valueeventV0- theeventV0field 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
-
getFunctionV0
Value of thefunctionV0field.- Returns:
- the
functionV0field value
-
getUdtStructV0
Value of theudtStructV0field.- Returns:
- the
udtStructV0field value
-
getUdtUnionV0
Value of theudtUnionV0field.- Returns:
- the
udtUnionV0field value
-
getUdtEnumV0
Value of theudtEnumV0field.- Returns:
- the
udtEnumV0field value
-
getUdtErrorEnumV0
Value of theudtErrorEnumV0field.- Returns:
- the
udtErrorEnumV0field value
-
getEventV0
Value of theeventV0field.- Returns:
- the
eventV0field value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setFunctionV0
Value of thefunctionV0field.- Parameters:
functionV0- thefunctionV0field value
-
setUdtStructV0
Value of theudtStructV0field.- Parameters:
udtStructV0- theudtStructV0field value
-
setUdtUnionV0
Value of theudtUnionV0field.- Parameters:
udtUnionV0- theudtUnionV0field value
-
setUdtEnumV0
Value of theudtEnumV0field.- Parameters:
udtEnumV0- theudtEnumV0field value
-
setUdtErrorEnumV0
Value of theudtErrorEnumV0field.- Parameters:
udtErrorEnumV0- theudtErrorEnumV0field value
-
setEventV0
Value of theeventV0field.- Parameters:
eventV0- theeventV0field value
-
equals
-
hashCode
public int hashCode() -
toString
-