Package org.stellar.sdk.xdr
Class SCContractInstance
java.lang.Object
org.stellar.sdk.xdr.SCContractInstance
- All Implemented Interfaces:
XdrElement
SCContractInstance's original definition in the XDR file is:
struct SCContractInstance {
ContractExecutable executable;
SCMap* storage;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSCContractInstance(ContractExecutable executable, SCMap storage) Creates a newSCContractInstanceinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SCContractInstancedecode(XdrDataInputStream stream) static SCContractInstancedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SCContractInstancestatic SCContractInstancefromXdrBase64(String xdr) static SCContractInstancefromXdrByteArray(byte[] xdr) Value of theexecutablefield.Value of thestoragefield.inthashCode()voidsetExecutable(ContractExecutable executable) Value of theexecutablefield.voidsetStorage(SCMap storage) Value of thestoragefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SCContractInstance
public SCContractInstance() -
SCContractInstance
Creates a newSCContractInstanceinstance.- Parameters:
executable- theexecutablefield valuestorage- thestoragefield 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
-
getExecutable
Value of theexecutablefield.- Returns:
- the
executablefield value
-
getStorage
Value of thestoragefield.- Returns:
- the
storagefield value
-
setExecutable
Value of theexecutablefield.- Parameters:
executable- theexecutablefield value
-
setStorage
Value of thestoragefield.- Parameters:
storage- thestoragefield value
-
equals
-
hashCode
public int hashCode() -
toString
-