Package org.stellar.sdk.xdr
Class Operation
java.lang.Object
org.stellar.sdk.xdr.Operation
- All Implemented Interfaces:
XdrElement
Operation's original definition in the XDR file is:
struct Operation
{
// sourceAccount is the account used to run the operation
// if not set, the runtime defaults to "sourceAccount" specified at
// the transaction level
MuxedAccount* sourceAccount;
union switch (OperationType type)
{
case CREATE_ACCOUNT:
CreateAccountOp createAccountOp;
case PAYMENT:
PaymentOp paymentOp;
case PATH_PAYMENT_STRICT_RECEIVE:
PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
case MANAGE_SELL_OFFER:
ManageSellOfferOp manageSellOfferOp;
case CREATE_PASSIVE_SELL_OFFER:
CreatePassiveSellOfferOp createPassiveSellOfferOp;
case SET_OPTIONS:
SetOptionsOp setOptionsOp;
case CHANGE_TRUST:
ChangeTrustOp changeTrustOp;
case ALLOW_TRUST:
AllowTrustOp allowTrustOp;
case ACCOUNT_MERGE:
MuxedAccount destination;
case INFLATION:
void;
case MANAGE_DATA:
ManageDataOp manageDataOp;
case BUMP_SEQUENCE:
BumpSequenceOp bumpSequenceOp;
case MANAGE_BUY_OFFER:
ManageBuyOfferOp manageBuyOfferOp;
case PATH_PAYMENT_STRICT_SEND:
PathPaymentStrictSendOp pathPaymentStrictSendOp;
case CREATE_CLAIMABLE_BALANCE:
CreateClaimableBalanceOp createClaimableBalanceOp;
case CLAIM_CLAIMABLE_BALANCE:
ClaimClaimableBalanceOp claimClaimableBalanceOp;
case BEGIN_SPONSORING_FUTURE_RESERVES:
BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
case END_SPONSORING_FUTURE_RESERVES:
void;
case REVOKE_SPONSORSHIP:
RevokeSponsorshipOp revokeSponsorshipOp;
case CLAWBACK:
ClawbackOp clawbackOp;
case CLAWBACK_CLAIMABLE_BALANCE:
ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
case SET_TRUST_LINE_FLAGS:
SetTrustLineFlagsOp setTrustLineFlagsOp;
case LIQUIDITY_POOL_DEPOSIT:
LiquidityPoolDepositOp liquidityPoolDepositOp;
case LIQUIDITY_POOL_WITHDRAW:
LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
case INVOKE_HOST_FUNCTION:
InvokeHostFunctionOp invokeHostFunctionOp;
case EXTEND_FOOTPRINT_TTL:
ExtendFootprintTTLOp extendFootprintTTLOp;
case RESTORE_FOOTPRINT:
RestoreFootprintOp restoreFootprintOp;
}
body;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOperationBody's original definition in the XDR file is:static class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionOperation(MuxedAccount sourceAccount, Operation.OperationBody body) Creates a newOperationinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic Operation.OperationBuilderbuilder()static Operationdecode(XdrDataInputStream stream) static Operationdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic Operationstatic OperationfromXdrBase64(String xdr) static OperationfromXdrByteArray(byte[] xdr) getBody()Value of thebodyfield.Value of thesourceAccountfield.inthashCode()voidValue of thebodyfield.voidsetSourceAccount(MuxedAccount sourceAccount) Value of thesourceAccountfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
Operation
public Operation() -
Operation
Creates a newOperationinstance.- Parameters:
sourceAccount- thesourceAccountfield valuebody- thebodyfield 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
-
getSourceAccount
Value of thesourceAccountfield.- Returns:
- the
sourceAccountfield value
-
getBody
Value of thebodyfield.- Returns:
- the
bodyfield value
-
setSourceAccount
Value of thesourceAccountfield.- Parameters:
sourceAccount- thesourceAccountfield value
-
setBody
Value of thebodyfield.- Parameters:
body- thebodyfield value
-
equals
-
hashCode
public int hashCode() -
toString
-