Package org.stellar.sdk.xdr
Class SCVal
java.lang.Object
org.stellar.sdk.xdr.SCVal
SCVal's original definition in the XDR file is:
union SCVal switch (SCValType type) { case SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error; case SCV_U32: uint32 u32; case SCV_I32: int32 i32; case SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration; case SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128; case SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256; case SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym; // Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map; case SCV_ADDRESS: SCAddress address; // Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; case SCV_CONTRACT_INSTANCE: SCContractInstance instance; };
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSCVal()
SCVal
(SCValType discriminant, Boolean b, SCError error, Uint32 u32, Int32 i32, Uint64 u64, Int64 i64, TimePoint timepoint, Duration duration, UInt128Parts u128, Int128Parts i128, UInt256Parts u256, Int256Parts i256, SCBytes bytes, SCString str, SCSymbol sym, SCVec vec, SCMap map, SCAddress address, SCNonceKey nonce_key, SCContractInstance instance) -
Method Summary
Modifier and TypeMethodDescriptionstatic SCVal.SCValBuilder
builder()
static SCVal
decode
(XdrDataInputStream stream) void
encode
(XdrDataOutputStream stream) boolean
static SCVal
fromXdrBase64
(String xdr) static SCVal
fromXdrByteArray
(byte[] xdr) getB()
getBytes()
getError()
getI128()
getI256()
getI32()
getI64()
getMap()
getStr()
getSym()
getU128()
getU256()
getU32()
getU64()
getVec()
int
hashCode()
void
setAddress
(SCAddress address) void
void
void
setDiscriminant
(SCValType discriminant) void
setDuration
(Duration duration) void
void
setI128
(Int128Parts i128) void
setI256
(Int256Parts i256) void
void
void
setInstance
(SCContractInstance instance) void
void
setNonce_key
(SCNonceKey nonce_key) void
void
void
setTimepoint
(TimePoint timepoint) void
setU128
(UInt128Parts u128) void
setU256
(UInt256Parts u256) void
void
void
toString()
default String
default byte[]
-
Constructor Details
-
SCVal
public SCVal() -
SCVal
public SCVal(SCValType discriminant, Boolean b, SCError error, Uint32 u32, Int32 i32, Uint64 u64, Int64 i64, TimePoint timepoint, Duration duration, UInt128Parts u128, Int128Parts i128, UInt256Parts u256, Int256Parts i256, SCBytes bytes, SCString str, SCSymbol sym, SCVec vec, SCMap map, SCAddress address, SCNonceKey nonce_key, SCContractInstance instance)
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getDiscriminant
-
getB
-
getError
-
getU32
-
getI32
-
getU64
-
getI64
-
getTimepoint
-
getDuration
-
getU128
-
getI128
-
getU256
-
getI256
-
getBytes
-
getStr
-
getSym
-
getVec
-
getMap
-
getAddress
-
getNonce_key
-
getInstance
-
setDiscriminant
-
setB
-
setError
-
setU32
-
setI32
-
setU64
-
setI64
-
setTimepoint
-
setDuration
-
setU128
-
setI128
-
setU256
-
setI256
-
setBytes
-
setStr
-
setSym
-
setVec
-
setMap
-
setAddress
-
setNonce_key
-
setInstance
-
equals
-
hashCode
public int hashCode() -
toString
-
toXdrBase64
- Throws:
IOException
-
toXdrByteArray
- Throws:
IOException
-