public class HostFunction extends java.lang.Object implements XdrElement
union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; };
Modifier and Type | Class and Description |
---|---|
static class |
HostFunction.HostFunctionBuilder |
Constructor and Description |
---|
HostFunction() |
HostFunction(HostFunctionType discriminant,
InvokeContractArgs invokeContract,
CreateContractArgs createContract,
byte[] wasm,
CreateContractArgsV2 createContractV2) |
Modifier and Type | Method and Description |
---|---|
static HostFunction.HostFunctionBuilder |
builder() |
static HostFunction |
decode(XdrDataInputStream stream) |
void |
encode(XdrDataOutputStream stream) |
boolean |
equals(java.lang.Object o) |
static HostFunction |
fromXdrBase64(java.lang.String xdr) |
static HostFunction |
fromXdrByteArray(byte[] xdr) |
CreateContractArgs |
getCreateContract() |
CreateContractArgsV2 |
getCreateContractV2() |
HostFunctionType |
getDiscriminant() |
InvokeContractArgs |
getInvokeContract() |
byte[] |
getWasm() |
int |
hashCode() |
void |
setCreateContract(CreateContractArgs createContract) |
void |
setCreateContractV2(CreateContractArgsV2 createContractV2) |
void |
setDiscriminant(HostFunctionType discriminant) |
void |
setInvokeContract(InvokeContractArgs invokeContract) |
void |
setWasm(byte[] wasm) |
HostFunction.HostFunctionBuilder |
toBuilder() |
java.lang.String |
toString() |
toXdrBase64, toXdrByteArray
public HostFunction()
public HostFunction(HostFunctionType discriminant, InvokeContractArgs invokeContract, CreateContractArgs createContract, byte[] wasm, CreateContractArgsV2 createContractV2)
public void encode(XdrDataOutputStream stream) throws java.io.IOException
encode
in interface XdrElement
java.io.IOException
public static HostFunction decode(XdrDataInputStream stream) throws java.io.IOException
java.io.IOException
public static HostFunction fromXdrBase64(java.lang.String xdr) throws java.io.IOException
java.io.IOException
public static HostFunction fromXdrByteArray(byte[] xdr) throws java.io.IOException
java.io.IOException
public static HostFunction.HostFunctionBuilder builder()
public HostFunction.HostFunctionBuilder toBuilder()
public HostFunctionType getDiscriminant()
public InvokeContractArgs getInvokeContract()
public CreateContractArgs getCreateContract()
public byte[] getWasm()
public CreateContractArgsV2 getCreateContractV2()
public void setDiscriminant(HostFunctionType discriminant)
public void setInvokeContract(InvokeContractArgs invokeContract)
public void setCreateContract(CreateContractArgs createContract)
public void setWasm(byte[] wasm)
public void setCreateContractV2(CreateContractArgsV2 createContractV2)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object