org.stjs.generator.javascript
Enum UnaryOperator

java.lang.Object
  extended by java.lang.Enum<UnaryOperator>
      extended by org.stjs.generator.javascript.UnaryOperator
All Implemented Interfaces:
Serializable, Comparable<UnaryOperator>

public enum UnaryOperator
extends Enum<UnaryOperator>

this is the list of the JavaScript operators and how they map on Java AST element Kind and Rhino token IDs. Some JavaScript operators do not have their Java counter part: like delete or typeof

Author:
acraciun

Enum Constant Summary
BITWISE_COMPLEMENT
           
DELETE_PROPERTY
           
LOGICAL_COMPLEMENT
           
POSTFIX_DECREMENT
           
POSTFIX_INCREMENT
           
PREFIX_DECREMENT
           
PREFIX_INCREMENT
           
TYPEOF
           
UNARY_MINUS
           
UNARY_PLUS
           
 
Method Summary
 com.sun.source.tree.Tree.Kind getJava()
           
 int getJavaScript()
           
 boolean isPostfix()
           
static UnaryOperator valueOf(String name)
          Returns the enum constant of this type with the specified name.
static UnaryOperator valueOf(com.sun.source.tree.Tree.Kind javaOperator)
           
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
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

POSTFIX_INCREMENT

public static final UnaryOperator POSTFIX_INCREMENT

POSTFIX_DECREMENT

public static final UnaryOperator POSTFIX_DECREMENT

PREFIX_INCREMENT

public static final UnaryOperator PREFIX_INCREMENT

PREFIX_DECREMENT

public static final UnaryOperator PREFIX_DECREMENT

UNARY_PLUS

public static final UnaryOperator UNARY_PLUS

UNARY_MINUS

public static final UnaryOperator UNARY_MINUS

BITWISE_COMPLEMENT

public static final UnaryOperator BITWISE_COMPLEMENT

LOGICAL_COMPLEMENT

public static final UnaryOperator LOGICAL_COMPLEMENT

TYPEOF

public static final UnaryOperator TYPEOF

DELETE_PROPERTY

public static final UnaryOperator DELETE_PROPERTY
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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isPostfix

public boolean isPostfix()

getJava

public com.sun.source.tree.Tree.Kind getJava()

getJavaScript

public int getJavaScript()

valueOf

public static UnaryOperator valueOf(com.sun.source.tree.Tree.Kind javaOperator)


Copyright © 2014. All Rights Reserved.