Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.expr
Class NopOperator

java.lang.Object
  extended bynet.sf.jode.expr.Expression
      extended bynet.sf.jode.expr.NopOperator

public class NopOperator
extends Expression

A NopOperator takes one arguments and returns it again. It is used as placeholder when the real operator is not yet known (e.g. in SwitchBlock, but also in every other Operator). A Nop operator doesn't have subExpressions; getSubExpressions() simply returns zero.

Author:
Jochen Hoenicke

Field Summary
 
Fields inherited from class net.sf.jode.expr.Expression
EMPTYSTRING, type
 
Constructor Summary
NopOperator(Type type)
           
 
Method Summary
 Expression addOperand(Expression op)
           
 void dumpExpression(TabbedPrintWriter writer)
           
 boolean equals(java.lang.Object o)
           
 int getFreeOperandCount()
          Get the number of operands.
 int getPriority()
          Get priority of the operator.
 boolean isConstant()
           
 Expression simplify()
           
 void updateSubTypes()
          Tells an expression that an outer expression has changed our type and that the inner types should be recalculated.
 void updateType()
          Tells an expression that an inner expression may have changed and that the type should be recalculated.
 
Methods inherited from class net.sf.jode.expr.Expression
canCombine, combine, containsConflictingLoad, containsMatchingLoad, dumpExpression, dumpExpression, fillDeclarables, fillInGenSet, getBreakPenalty, getParent, getType, hasSideEffects, isVoid, makeDeclaration, makeInitializer, negate, removeOnetimeLocals, setType, simplifyString, simplifyStringBuffer, toString, updateParentType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NopOperator

public NopOperator(Type type)
Method Detail

getFreeOperandCount

public int getFreeOperandCount()
Description copied from class: Expression
Get the number of operands.

Specified by:
getFreeOperandCount in class Expression
Returns:
The number of stack entries this expression needs.

getPriority

public int getPriority()
Description copied from class: Expression
Get priority of the operator. Currently this priorities are known:

Specified by:
getPriority in class Expression

updateSubTypes

public void updateSubTypes()
Description copied from class: Expression
Tells an expression that an outer expression has changed our type and that the inner types should be recalculated.

Specified by:
updateSubTypes in class Expression

updateType

public void updateType()
Description copied from class: Expression
Tells an expression that an inner expression may have changed and that the type should be recalculated. This may call setType of the caller again.

Specified by:
updateType in class Expression

addOperand

public Expression addOperand(Expression op)
Specified by:
addOperand in class Expression

isConstant

public boolean isConstant()
Overrides:
isConstant in class Expression

equals

public boolean equals(java.lang.Object o)

simplify

public Expression simplify()
Overrides:
simplify in class Expression

dumpExpression

public void dumpExpression(TabbedPrintWriter writer)
                    throws java.io.IOException
Specified by:
dumpExpression in class Expression
Throws:
java.io.IOException

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.