Home » openjdk-7 » com.sun.tools » javac » comp » [javadoc | source]
com.sun.tools.javac.comp
class: ConstFold [javadoc | source]
java.lang.Object
   com.sun.tools.javac.comp.ConstFold
Helper class for constant folding, used by the attribution phase. This class is marked strictfp as mandated by JLS 15.4.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Field Summary
protected static final  Key<ConstFold> constFoldKey     
static  Integer minusOne     
static  Integer zero     
static  Integer one     
Method from com.sun.tools.javac.comp.ConstFold Summary:
coerce,   fold,   fold1,   fold2,   instance
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.comp.ConstFold Detail:
 Type coerce(Type etype,
    Type ttype) 
    Coerce constant type to target type.
 Type fold(int opcode,
    List<Type> argtypes) 
    Fold binary or unary operation, returning constant type reflecting the operations result. Return null if fold failed due to an arithmetic exception.
 Type fold1(int opcode,
    Type operand) 
    Fold unary operation.
 Type fold2(int opcode,
    Type left,
    Type right) 
    Fold binary operation.
 public static ConstFold instance(Context context)