edu.cmu.cs.crystal.tac
Enum UnaryOperator

java.lang.Object
  extended by java.lang.Enum<UnaryOperator>
      extended by edu.cmu.cs.crystal.tac.UnaryOperator
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UnaryOperator>

public enum UnaryOperator
extends java.lang.Enum<UnaryOperator>

Unary operators. Notice that + (plus) and - (minus) can also be BinaryOperators.

Author:
Kevin Bierhoff

Enum Constant Summary
ARIT_MINUS
           
ARIT_PLUS
           
BITWISE_COMPLEMENT
           
BOOL_NOT
           
 
Field Summary
 java.lang.String token
          Token representing the operator in source code, such as +, !=, or >>.
 
Method Summary
 java.lang.String toString()
           
static UnaryOperator valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static UnaryOperator[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ARIT_PLUS

public static final UnaryOperator ARIT_PLUS

ARIT_MINUS

public static final UnaryOperator ARIT_MINUS

BITWISE_COMPLEMENT

public static final UnaryOperator BITWISE_COMPLEMENT

BOOL_NOT

public static final UnaryOperator BOOL_NOT
Field Detail

token

public java.lang.String token
Token representing the operator in source code, such as +, !=, or >>.

Method Detail

values

public static UnaryOperator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (UnaryOperator c : UnaryOperator.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static UnaryOperator valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<UnaryOperator>