Enum Class Opcode

java.lang.Object
java.lang.Enum<Opcode>
com.maroontress.intexpr.impl.Opcode
All Implemented Interfaces:
Serializable, Comparable<Opcode>, Constable

public enum Opcode extends Enum<Opcode>
Provides constants of opcodes to visualize the syntax tree.
See Also:
  • Enum Constant Details

    • NEG

      public static final Opcode NEG
      Negation.
    • POS

      public static final Opcode POS
      Positive (NOP).
    • NOT

      public static final Opcode NOT
      Bitwise NOT.
    • LNOT

      public static final Opcode LNOT
      Logical negation.
    • MUL

      public static final Opcode MUL
      Multiplication.
    • DIV

      public static final Opcode DIV
      Division.
    • MOD

      public static final Opcode MOD
      Modulo.
    • ADD

      public static final Opcode ADD
      Addition.
    • SUB

      public static final Opcode SUB
      Subtraction.
    • SHR

      public static final Opcode SHR
      Bitwise right shift.
    • SHL

      public static final Opcode SHL
      Bitwise left shift.
    • LGT

      public static final Opcode LGT
      Greater than.
    • LLT

      public static final Opcode LLT
      Less than.
    • LGE

      public static final Opcode LGE
      Greater than or equal to.
    • LLE

      public static final Opcode LLE
      Less than or equal to.
    • LNE

      public static final Opcode LNE
      Not equal to.
    • LEQ

      public static final Opcode LEQ
      Equal to.
    • AND

      public static final Opcode AND
      Bitwise AND.
    • XOR

      public static final Opcode XOR
      Bitwise XOR.
    • OR

      public static final Opcode OR
      Bitwise OR.
    • LAND

      public static final Opcode LAND
      Logical AND.
    • LOR

      public static final Opcode LOR
      Logical OR.
    • CONST

      public static final Opcode CONST
      Constant (immediate value).
  • Method Details

    • values

      public static Opcode[] 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 Opcode 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