com.caucho.quercus.expr
Class VarExprPro

java.lang.Object
  extended by com.caucho.quercus.expr.Expr
      extended by com.caucho.quercus.expr.AbstractVarExpr
          extended by com.caucho.quercus.expr.VarExpr
              extended by com.caucho.quercus.expr.VarExprPro
All Implemented Interfaces:
ExprPro
Direct Known Subclasses:
VarTempExprPro

public class VarExprPro
extends VarExpr
implements ExprPro

Represents a PHP variable expression.


Field Summary
 
Fields inherited from class com.caucho.quercus.expr.VarExpr
_name
 
Fields inherited from class com.caucho.quercus.expr.Expr
COMPILE_ARG_MAX
 
Constructor Summary
VarExprPro(InfoVarPro var)
           
 
Method Summary
 VarExprPro analyzeMerge(VarExprPro mergeVar)
          Sets the assignment state of the variable.
 VarExprPro analyzeVarState(VarState state)
          Sets the assignment state of the variable.
 void assign(QuercusParser parser)
          Creates the assignment.
 Expr copy(Location location)
          Copy for things like $a .= "test";
 Expr createAssignRef(QuercusParser parser, Expr value)
          Creates the assignment.
 ExprGenerator getGenerator()
          Returns the expression's generator.
 void getVariables(java.util.HashSet<VarExpr> vars)
          Returns the variables used in the expression
 InfoVarPro getVarInfo()
          Returns the variable info.
 VarState getVarState()
          Returns the assignment state of the variable.
 VarState getVarState(VarExpr var, VarExpr owner)
          Returns the variables state.
 boolean isValue()
           
 void setInitializedVar(boolean isInit)
           
 void setVarState(VarState state)
          Sets the assignment state of the variable.
 
Methods inherited from class com.caucho.quercus.expr.VarExpr
createAssign, equals, eval, evalArg, evalArray, evalAssignRef, evalAssignValue, evalCopy, evalIsset, evalObject, evalTop, evalUnset, evalVar, getJavaVar, getName, hashCode, toString
 
Methods inherited from class com.caucho.quercus.expr.AbstractVarExpr
createCopy, createRef, createUnset, evalRef, isVar
 
Methods inherited from class com.caucho.quercus.expr.Expr
canRead, createAssignFrom, createCall, createClassConst, createClassField, createClassField, createDeref, createFieldGet, createFieldGet, createIsset, evalArgs, evalArrayAssign, evalBoolean, evalChar, evalConstant, evalConstantPrefix, evalConstantSuffix, evalDirty, evalDouble, evalLong, evalPostIncrement, evalPreIncrement, evalString, evalStringValue, evalUnsetArray, evalValue, getFileName, getFunctionLocation, getLine, getLocation, getLocationLine, isArray, isAssign, isBoolean, isConstant, isDouble, isFalse, isLiteral, isLong, isNumber, isRef, isString, isTrue, print
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VarExprPro

public VarExprPro(InfoVarPro var)
Method Detail

getVarInfo

public InfoVarPro getVarInfo()
Returns the variable info.

Overrides:
getVarInfo in class VarExpr

isValue

public boolean isValue()

copy

public Expr copy(Location location)
Copy for things like $a .= "test";

Overrides:
copy in class VarExpr
Parameters:
location -

assign

public void assign(QuercusParser parser)
Creates the assignment.

Overrides:
assign in class VarExpr

createAssignRef

public Expr createAssignRef(QuercusParser parser,
                            Expr value)
Creates the assignment.

Overrides:
createAssignRef in class VarExpr

analyzeVarState

public VarExprPro analyzeVarState(VarState state)
Sets the assignment state of the variable.


getVariables

public void getVariables(java.util.HashSet<VarExpr> vars)
Returns the variables used in the expression

Parameters:
vars - the variables used in the function

getVarState

public VarState getVarState()
Returns the assignment state of the variable.


setVarState

public void setVarState(VarState state)
Sets the assignment state of the variable.


analyzeMerge

public VarExprPro analyzeMerge(VarExprPro mergeVar)
Sets the assignment state of the variable.


getVarState

public VarState getVarState(VarExpr var,
                            VarExpr owner)
Returns the variables state.

Parameters:
var - the variables to test
owner - the owning expression

setInitializedVar

public void setInitializedVar(boolean isInit)

getGenerator

public ExprGenerator getGenerator()
Description copied from interface: ExprPro
Returns the expression's generator.

Specified by:
getGenerator in interface ExprPro