Package org.stellar.sdk.xdr
Class SCVal
java.lang.Object
org.stellar.sdk.xdr.SCVal
- All Implemented Interfaces:
XdrElement
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_CONTRACT_INSTANCE:
SCContractInstance instance;
case SCV_LEDGER_KEY_CONTRACT_INSTANCE:
void;
case SCV_LEDGER_KEY_NONCE:
SCNonceKey nonce_key;
};
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSCVal()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, SCContractInstance instance, SCNonceKey nonce_key) -
Method Summary
Modifier and TypeMethodDescriptionstatic SCVal.SCValBuilderbuilder()static SCValdecode(XdrDataInputStream stream) voidencode(XdrDataOutputStream stream) booleanstatic SCValfromXdrBase64(String xdr) static SCValfromXdrByteArray(byte[] xdr) getB()getBytes()getError()getI128()getI256()getI32()getI64()getMap()getStr()getSym()getU128()getU256()getU32()getU64()getVec()inthashCode()voidsetAddress(SCAddress address) voidvoidvoidsetDiscriminant(SCValType discriminant) voidsetDuration(Duration duration) voidvoidsetI128(Int128Parts i128) voidsetI256(Int256Parts i256) voidvoidvoidsetInstance(SCContractInstance instance) voidvoidsetNonce_key(SCNonceKey nonce_key) voidvoidvoidsetTimepoint(TimePoint timepoint) voidsetU128(UInt128Parts u128) voidsetU256(UInt256Parts u256) voidvoidvoidtoString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
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, SCContractInstance instance, SCNonceKey nonce_key)
-
-
Method Details
-
encode
- Specified by:
encodein interfaceXdrElement- 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
-
getInstance
-
getNonce_key
-
setDiscriminant
-
setB
-
setError
-
setU32
-
setI32
-
setU64
-
setI64
-
setTimepoint
-
setDuration
-
setU128
-
setI128
-
setU256
-
setI256
-
setBytes
-
setStr
-
setSym
-
setVec
-
setMap
-
setAddress
-
setInstance
-
setNonce_key
-
equals
-
hashCode
public int hashCode() -
toString
-