|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jode.expr.Expression
public abstract class Expression
Field Summary | |
---|---|
static Expression |
EMPTYSTRING
|
protected Type |
type
|
Constructor Summary | |
---|---|
Expression(Type type)
|
Method Summary | |
---|---|
abstract Expression |
addOperand(Expression op)
|
int |
canCombine(CombineableOperator combOp)
Checks if the given Expression (which should be a CombineableOperator) can be combined into this expression. |
Expression |
combine(CombineableOperator comb)
Combines the given Expression (which should be a StoreInstruction) into this expression. |
boolean |
containsConflictingLoad(MatchableOperator op)
Checks if this expression contains a conflicting load, that matches the given CombineableOperator. |
boolean |
containsMatchingLoad(CombineableOperator e)
Checks if this expression contains a load, that matches the given CombineableOperator (which must be an Operator) |
void |
dumpExpression(int options,
TabbedPrintWriter writer)
|
abstract void |
dumpExpression(TabbedPrintWriter writer)
|
void |
dumpExpression(TabbedPrintWriter writer,
int minPriority)
|
void |
fillDeclarables(Collection used)
|
void |
fillInGenSet(Collection in,
Collection gen)
|
int |
getBreakPenalty()
Get the penalty for splitting up this operator. |
abstract int |
getFreeOperandCount()
Get the number of operands. |
Operator |
getParent()
|
abstract int |
getPriority()
Get priority of the operator. |
Type |
getType()
|
boolean |
hasSideEffects(Expression expr)
Checks if the value of the given expression can change, due to side effects in this expression. |
boolean |
isConstant()
|
boolean |
isVoid()
|
void |
makeDeclaration(Set done)
|
void |
makeInitializer(Type type)
|
Expression |
negate()
|
Expression |
removeOnetimeLocals()
This method should remove local variables that are only written and read one time directly after another. |
void |
setType(Type otherType)
|
Expression |
simplify()
|
Expression |
simplifyString()
|
Expression |
simplifyStringBuffer()
|
String |
toString()
|
void |
updateParentType(Type otherType)
|
abstract void |
updateSubTypes()
Tells an expression that an outer expression has changed our type and that the inner types should be recalculated. |
abstract void |
updateType()
Tells an expression that an inner expression may have changed and that the type should be recalculated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Type type
public static Expression EMPTYSTRING
Constructor Detail |
---|
public Expression(Type type)
Method Detail |
---|
public void setType(Type otherType)
public void updateParentType(Type otherType)
public abstract void updateType()
public abstract void updateSubTypes()
public Type getType()
public Operator getParent()
public abstract int getPriority()
public int getBreakPenalty()
public abstract int getFreeOperandCount()
public abstract Expression addOperand(Expression op)
public Expression negate()
public boolean hasSideEffects(Expression expr)
expr
- the expression that should not change.public int canCombine(CombineableOperator combOp)
combOp
- The store expression, must be of type void.
public boolean containsMatchingLoad(CombineableOperator e)
e
- The store expression.
ClassCastException,
- if e.getOperator
is not a CombineableOperator.public boolean containsConflictingLoad(MatchableOperator op)
op
- The combineable operator.
public Expression combine(CombineableOperator comb)
comb
- The store expression,
the operator must be a CombineableOperator.
ClassCastException,
- if e.getOperator
is not a CombineableOperator.public Expression removeOnetimeLocals()
public Expression simplify()
public Expression simplifyString()
public Expression simplifyStringBuffer()
public void makeInitializer(Type type)
public boolean isConstant()
public void fillInGenSet(Collection in, Collection gen)
public void fillDeclarables(Collection used)
public void makeDeclaration(Set done)
public abstract void dumpExpression(TabbedPrintWriter writer) throws IOException
IOException
public void dumpExpression(int options, TabbedPrintWriter writer) throws IOException
IOException
public void dumpExpression(TabbedPrintWriter writer, int minPriority) throws IOException
IOException
public String toString()
toString
in class Object
public boolean isVoid()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |