Skip to content

Commit

Permalink
Revert "Revert "javadoc""
Browse files Browse the repository at this point in the history
This reverts commit 2c7c292.
  • Loading branch information
nkramer44 committed Nov 2, 2024
1 parent b373230 commit 6251706
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import org.immutables.value.Value.Immutable;
import org.xrpl.xrpl4j.model.flags.TransactionFlags;

/**
* Mapping for any transaction type that is unrecognized/unsupported by xrpl4j.
*/
@Immutable
@JsonSerialize(as = ImmutableUnknownTransaction.class)
@JsonDeserialize(as = ImmutableUnknownTransaction.class)
Expand All @@ -23,7 +26,9 @@ static ImmutableUnknownTransaction.Builder builder() {
}

/**
* This has to be a {@link String} because {@link Transaction#transactionType()} is a {@link TransactionType},
* The actual transaction type found in the {@code "TransactionType"} field of the transaction JSON.
*
* <p>This has to be a {@link String} because {@link Transaction#transactionType()} is a {@link TransactionType},
* which only has an UNKNOWN variant. Because this method is also annotated with {@link JsonProperty} of
* "TransactionType", this essentially overrides the "TransactionType" field in JSON, but {@link #transactionType()}
* will always be {@link TransactionType#UNKNOWN} and this field will contain the actual "TransactionType" field.
Expand All @@ -33,12 +38,24 @@ static ImmutableUnknownTransaction.Builder builder() {
@JsonProperty("TransactionType")
String unknownTransactionType();

/**
* The {@link TransactionType} of this UnknownTransaction, which will always be {@link TransactionType#UNKNOWN}.
* {@link #unknownTransactionType()} contains the actual transaction type value.
*
* @return {@link TransactionType#UNKNOWN}.
*/
@Override
@JsonIgnore
@Value.Derived
default TransactionType transactionType() {
return Transaction.super.transactionType();
}

/**
* A set of {@link TransactionFlags}.
*
* @return A {@link TransactionFlags}.
*/
@JsonProperty("Flags")
@Value.Default
default TransactionFlags flags() {
Expand Down

0 comments on commit 6251706

Please sign in to comment.