SandMark version 2.0


sandmark.obfuscate.boolsplitter.dtree
Class Expr

java.lang.Object
  |
  +--sandmark.obfuscate.boolsplitter.dtree.Node
        |
        +--sandmark.obfuscate.boolsplitter.dtree.Expr
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
ArithExpr, ArrayLengthExpr, CallExpr, CastExpr, CatchExpr, CheckExpr, CondExpr, ConstantExpr, DefExpr, NegExpr, NewArrayExpr, NewExpr, NewMultiArrayExpr, ReturnAddressExpr, ShiftExpr, StoreExpr

public abstract class Expr
extends Node
implements java.lang.Cloneable

Expr is the superclass for a number of other classes representing expressions in byte code. Expressions are typed and may be nested.

See Also:
DefExpr

Field Summary
static java.lang.String B
           
static java.lang.String BARRAY
           
static java.lang.String BOOL
           
static java.lang.String BOOLARRAY
           
 java.util.Vector range
           
protected  EDU.purdue.cs.bloat.editor.Type type
           
static java.lang.String UNDEF
           
 
Fields inherited from class sandmark.obfuscate.boolsplitter.dtree.Node
key, parent, valueNumber
 
Constructor Summary
Expr(EDU.purdue.cs.bloat.editor.Type type)
          Constructor.
 
Method Summary
 void cleanupOnly()
          Cleans up this expression only, not its children.
abstract  java.lang.Object clone()
           
 java.lang.Object comparator()
          Returns an Object that can be used to compare other Expr to this.
protected  Expr copyInto(Expr expr)
          Copies the contents of another expression in this one.
 DefExpr def()
          Returns the expression in which this Expr is defined.
abstract  boolean equalsExpr(Expr other)
          Compares this expression to another.
abstract  int exprHashCode()
          Returns the hash code for this expresion.
 boolean isDef()
          Returns whether or not this expression is a defining occurrence.
 void mergeRange(java.util.Vector r2m)
           
 void setDef(DefExpr def)
          Sets the expression that defines this expression.
 boolean setType(EDU.purdue.cs.bloat.editor.Type type)
          Sets the type of this expression.
 Stmt stmt()
          Returns the statement to which this expression belongs.
 EDU.purdue.cs.bloat.editor.Type type()
          Returns the Type of this expression.
 
Methods inherited from class sandmark.obfuscate.boolsplitter.dtree.Node
block, cleanup, copyInto, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visit, visitChildren, visitForceChildren, visitOnly
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected EDU.purdue.cs.bloat.editor.Type type

range

public java.util.Vector range

UNDEF

public static java.lang.String UNDEF

BOOL

public static java.lang.String BOOL

BOOLARRAY

public static java.lang.String BOOLARRAY

BARRAY

public static java.lang.String BARRAY

B

public static java.lang.String B
Constructor Detail

Expr

public Expr(EDU.purdue.cs.bloat.editor.Type type)
Constructor. Initializes an expression with a given type.

Parameters:
type - The initial Type (descriptor) of this expression.
Method Detail

mergeRange

public void mergeRange(java.util.Vector r2m)

setType

public boolean setType(EDU.purdue.cs.bloat.editor.Type type)
Sets the type of this expression. Returns whether or not the type changed as a result of calling this method.


isDef

public boolean isDef()
Returns whether or not this expression is a defining occurrence. By default, false is returned.


stmt

public Stmt stmt()
Returns the statement to which this expression belongs. It essentially searches up the expression tree for this expression's first ancestor which is a Stmt.


type

public EDU.purdue.cs.bloat.editor.Type type()
Returns the Type of this expression.


cleanupOnly

public void cleanupOnly()
Cleans up this expression only, not its children.

Specified by:
cleanupOnly in class Node

setDef

public void setDef(DefExpr def)
Sets the expression that defines this expression.

Parameters:
def - Defining expression.

def

public DefExpr def()
Returns the expression in which this Expr is defined.


exprHashCode

public abstract int exprHashCode()
Returns the hash code for this expresion.


equalsExpr

public abstract boolean equalsExpr(Expr other)
Compares this expression to another.

Parameters:
other - Expr to which to compare this.

clone

public abstract java.lang.Object clone()
Overrides:
clone in class java.lang.Object

copyInto

protected Expr copyInto(Expr expr)
Copies the contents of another expression in this one.

Parameters:
expr - The expression from which to copy.

comparator

public java.lang.Object comparator()
Returns an Object that can be used to compare other Expr to this.


SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002