Enum Class AccountFlags

java.lang.Object
java.lang.Enum<AccountFlags>
org.stellar.sdk.xdr.AccountFlags
All Implemented Interfaces:
Serializable, Comparable<AccountFlags>, Constable, XdrElement

public enum AccountFlags extends Enum<AccountFlags> implements XdrElement
AccountFlags's original definition in the XDR file is:
 enum AccountFlags
 { // masks for each flag

     // Flags set on issuer accounts
     // TrustLines are created with authorized set to "false" requiring
     // the issuer to set it for each TrustLine
     AUTH_REQUIRED_FLAG = 0x1,
     // If set, the authorized flag in TrustLines can be cleared
     // otherwise, authorization cannot be revoked
     AUTH_REVOCABLE_FLAG = 0x2,
     // Once set, causes all AUTH_* flags to be read-only
     AUTH_IMMUTABLE_FLAG = 0x4,
     // Trustlines are created with clawback enabled set to "true",
     // and claimable balances created from those trustlines are created
     // with clawback enabled set to "true"
     AUTH_CLAWBACK_ENABLED_FLAG = 0x8
 };
 
  • Enum Constant Details

    • AUTH_REQUIRED_FLAG

      public static final AccountFlags AUTH_REQUIRED_FLAG
    • AUTH_REVOCABLE_FLAG

      public static final AccountFlags AUTH_REVOCABLE_FLAG
    • AUTH_IMMUTABLE_FLAG

      public static final AccountFlags AUTH_IMMUTABLE_FLAG
    • AUTH_CLAWBACK_ENABLED_FLAG

      public static final AccountFlags AUTH_CLAWBACK_ENABLED_FLAG
  • Method Details

    • values

      public static AccountFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AccountFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
    • decode

      public static AccountFlags decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      public static AccountFlags decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • fromXdrBase64

      public static AccountFlags fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static AccountFlags fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static AccountFlags fromJson(String json)