entities
Class ConstantExpression

java.lang.Object
  extended byentities.Expression
      extended byentities.ConstantExpression
All Implemented Interfaces:
ScopeManager

public class ConstantExpression
extends Expression

The class ConstantExpression represents a constant expression


Field Summary
 
Fields inherited from class entities.Expression
fCast, fFile, fLBracketPosition, fOperator, fParentScope, fPosition, fPreviousExpression, fRBracketPosition, fToTrace, fTypeOfCast, SEPARATORS
 
Constructor Summary
ConstantExpression(ScopeManager parentScope)
           
 
Method Summary
 void computeType(ScopeInfo scopeInfo, java.lang.String indentation)
          Empty
 java.lang.String getString()
           
 java.lang.String getValue()
           
 void print(java.lang.String indentation)
          Print all information contained in a expression of type ConstantExpression
 void setValue(java.lang.String value)
          Set the constant value
 
Methods inherited from class entities.Expression
addClass, addClassHeaderFile, addEnumerator, addExpression, addExternalField, addExternalMethod, addField, addFriendClass, addFriendFunction, addFriendMethod, addFunction, addGeneralization, addMethod, addNameSpace, addType, addUserType, addVariable, cleanType, fillName, fillNameNew, findVariableType, getAllocationType, getCast, getCastType, getClassContext, getContainingMethod, getContext, getContextNew, getCurrentMethod, getFile, getLBracketPosition, getName, getOperator, getOperators, getParent, getParentScope, getPosition, getPreviousExpression, getRBracketPosition, getType, getTypeOfCast, propagateParentScope, resolveType, setCast, setFile, setLBracketPosition, setOperator, setParentScope, setPosition, setPreviousExpression, setRBracketPosition, setTypeOfCast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantExpression

public ConstantExpression(ScopeManager parentScope)
Method Detail

getValue

public java.lang.String getValue()
Returns:
the constant value as a String

Ex: a = 5; s = "xxxx"

On the ConstantExpression object corresponding to "5" it returns "5"

On the ConstantExpression object corresponding to "xxxx" it returns "xxxx"


getString

public java.lang.String getString()
Overrides:
getString in class Expression
Returns:
the representation of the Expression as a String (it is not a thorough reconstruction)

setValue

public void setValue(java.lang.String value)
Set the constant value


computeType

public void computeType(ScopeInfo scopeInfo,
                        java.lang.String indentation)
Empty

Overrides:
computeType in class Expression

print

public void print(java.lang.String indentation)
Print all information contained in a expression of type ConstantExpression

Specified by:
print in interface ScopeManager
Overrides:
print in class Expression