Package org.stellar.sdk.xdr
Class ContractCodeEntry
java.lang.Object
org.stellar.sdk.xdr.ContractCodeEntry
- All Implemented Interfaces:
XdrElement
ContractCodeEntry's original definition in the XDR file is:
struct ContractCodeEntry {
union switch (int v)
{
case 0:
void;
case 1:
struct
{
ExtensionPoint ext;
ContractCodeCostInputs costInputs;
} v1;
} ext;
Hash hash;
opaque code<>;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classContractCodeEntryExt's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionContractCodeEntry(ContractCodeEntry.ContractCodeEntryExt ext, Hash hash, byte[] code) Creates a newContractCodeEntryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ContractCodeEntrydecode(XdrDataInputStream stream) static ContractCodeEntrydecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ContractCodeEntrystatic ContractCodeEntryfromXdrBase64(String xdr) static ContractCodeEntryfromXdrByteArray(byte[] xdr) byte[]getCode()Value of thecodefield.getExt()Value of theextfield.getHash()Value of thehashfield.inthashCode()voidsetCode(byte[] code) Value of thecodefield.voidValue of theextfield.voidValue of thehashfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ContractCodeEntry
public ContractCodeEntry() -
ContractCodeEntry
Creates a newContractCodeEntryinstance.- Parameters:
ext- theextfield valuehash- thehashfield valuecode- thecodefield 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
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
getHash
Value of thehashfield.- Returns:
- the
hashfield value
-
getCode
public byte[] getCode()Value of thecodefield.- Returns:
- the
codefield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
setHash
Value of thehashfield.- Parameters:
hash- thehashfield value
-
setCode
public void setCode(byte[] code) Value of thecodefield.- Parameters:
code- thecodefield value
-
equals
-
hashCode
public int hashCode() -
toString
-