Enum Class Operator

java.lang.Object
java.lang.Enum<Operator>
icyllis.arc3d.compiler.Operator
All Implemented Interfaces:
Serializable, Comparable<Operator>, Constable

public enum Operator extends Enum<Operator>
Operators.
  • Enum Constant Details

    • ADD

      public static final Operator ADD
    • SUB

      public static final Operator SUB
    • MUL

      public static final Operator MUL
    • DIV

      public static final Operator DIV
    • MOD

      public static final Operator MOD
    • SHL

      public static final Operator SHL
    • SHR

      public static final Operator SHR
    • LOGICAL_NOT

      public static final Operator LOGICAL_NOT
    • LOGICAL_AND

      public static final Operator LOGICAL_AND
    • LOGICAL_OR

      public static final Operator LOGICAL_OR
    • LOGICAL_XOR

      public static final Operator LOGICAL_XOR
    • BITWISE_NOT

      public static final Operator BITWISE_NOT
    • BITWISE_AND

      public static final Operator BITWISE_AND
    • BITWISE_OR

      public static final Operator BITWISE_OR
    • BITWISE_XOR

      public static final Operator BITWISE_XOR
    • ASSIGN

      public static final Operator ASSIGN
    • EQ

      public static final Operator EQ
    • NE

      public static final Operator NE
    • LT

      public static final Operator LT
    • GT

      public static final Operator GT
    • LE

      public static final Operator LE
    • GE

      public static final Operator GE
    • ADD_ASSIGN

      public static final Operator ADD_ASSIGN
    • SUB_ASSIGN

      public static final Operator SUB_ASSIGN
    • MUL_ASSIGN

      public static final Operator MUL_ASSIGN
    • DIV_ASSIGN

      public static final Operator DIV_ASSIGN
    • MOD_ASSIGN

      public static final Operator MOD_ASSIGN
    • SHL_ASSIGN

      public static final Operator SHL_ASSIGN
    • SHR_ASSIGN

      public static final Operator SHR_ASSIGN
    • AND_ASSIGN

      public static final Operator AND_ASSIGN
    • OR_ASSIGN

      public static final Operator OR_ASSIGN
    • XOR_ASSIGN

      public static final Operator XOR_ASSIGN
    • INC

      public static final Operator INC
    • DEC

      public static final Operator DEC
    • COMMA

      public static final Operator COMMA
  • Field Details

    • PRECEDENCE_POSTFIX

      public static final int PRECEDENCE_POSTFIX
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_PREFIX

      public static final int PRECEDENCE_PREFIX
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_MULTIPLICATIVE

      public static final int PRECEDENCE_MULTIPLICATIVE
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_ADDITIVE

      public static final int PRECEDENCE_ADDITIVE
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_SHIFT

      public static final int PRECEDENCE_SHIFT
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_RELATIONAL

      public static final int PRECEDENCE_RELATIONAL
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_EQUALITY

      public static final int PRECEDENCE_EQUALITY
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_BITWISE_AND

      public static final int PRECEDENCE_BITWISE_AND
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_BITWISE_XOR

      public static final int PRECEDENCE_BITWISE_XOR
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_BITWISE_OR

      public static final int PRECEDENCE_BITWISE_OR
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_LOGICAL_AND

      public static final int PRECEDENCE_LOGICAL_AND
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_LOGICAL_XOR

      public static final int PRECEDENCE_LOGICAL_XOR
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_LOGICAL_OR

      public static final int PRECEDENCE_LOGICAL_OR
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_CONDITIONAL

      public static final int PRECEDENCE_CONDITIONAL
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_ASSIGNMENT

      public static final int PRECEDENCE_ASSIGNMENT
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_SEQUENCE

      public static final int PRECEDENCE_SEQUENCE
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_EXPRESSION

      public static final int PRECEDENCE_EXPRESSION
      OperatorPrecedence.
      Enum values:
      See Also:
    • PRECEDENCE_STATEMENT

      public static final int PRECEDENCE_STATEMENT
      OperatorPrecedence.
      Enum values:
      See Also:
  • Method Details

    • values

      public static Operator[] 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 Operator 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
    • getBinaryPrecedence

      public int getBinaryPrecedence()
    • getPrettyName

      public String getPrettyName()
      Returns the operator name surrounded by the expected whitespace for a tidy binary expression.
    • toString

      public String toString()
      Returns the operator name without any surrounding whitespace.
      Overrides:
      toString in class Enum<Operator>
    • isEquality

      public boolean isEquality()
    • isRelational

      public boolean isRelational()
      Defines the set of relational (comparison) operators: invalid input: '<' invalid input: '<'= > >=
    • isAssignment

      public boolean isAssignment()
      Returns true if op is '=' or any compound assignment operator ('+=', '-=', etc.)
    • removeAssignment

      public Operator removeAssignment()
      Given a compound assignment operator, returns the non-assignment version of the operator (e.g. '+=' becomes '+')
    • isOnlyValidForIntegers

      public boolean isOnlyValidForIntegers()
      Defines the set of operators which are only valid on integral types: % %= invalid input: '<'invalid input: '<' invalid input: '<'invalid input: '<'= >> >>= ~ invalid input: '&' invalid input: '&'= | |= ^ ^=
    • isValidForVectorOrMatrix

      public boolean isValidForVectorOrMatrix()
      Defines the set of operators which perform vector/matrix math. + += - -= * *= / /= % %= invalid input: '<'invalid input: '<' invalid input: '<'invalid input: '<'= >> >>= invalid input: '&' invalid input: '&'= | |= ^ ^=
    • determineBinaryType

      public boolean determineBinaryType(Context context, Type left, Type right, Type[] out)
      Determines the operand and result types of a binary expression. Returns true if the expression is legal, false otherwise. If false, the values of the out parameters are undefined.
      Parameters:
      out - left type, right type and result type, respectively