Package de.monticore.types3.util
Class LValueRelations
- java.lang.Object
-
- de.monticore.types3.util.LValueRelations
-
- Direct Known Subclasses:
CommonExpressionsLValueRelations
public class LValueRelations extends java.lang.ObjectWhether an expression is an LValue, s.isLValue(ASTExpression).There is no (non-trivial) default implementation, as this tends to be based on the ASTExpression in question. In most cases, you want to use
CommonExpressionsLValueRelations.
-
-
Field Summary
Fields Modifier and Type Field Description protected static LValueRelationsdelegate
-
Constructor Summary
Constructors Constructor Description LValueRelations()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean_isLValue(ASTExpression expr)protected static LValueRelationsgetDelegate()static voidinit()static booleanisLValue(ASTExpression expr)Tests whether an expression can be considered an LValue for corresponding assignment CoCos.static voidreset()protected static voidsetDelegate(LValueRelations newDelegate)
-
-
-
Field Detail
-
delegate
protected static LValueRelations delegate
-
-
Method Detail
-
isLValue
public static boolean isLValue(ASTExpression expr)
Tests whether an expression can be considered an LValue for corresponding assignment CoCos. Expressions have a type and a value category. In our type systems values can be categorised by whether they have an identity, i.e., an address in memory, and thus can be assigned to. Values that can be assigned to are lvalues, examples include variables, e.g., int i = 0; // i is a variable and thus a lvalue int[] is = new int[3]; is[0] = 0; // is[0] is a variable and thus a lvalue Note, not every lvalue can be assigned to, e.g., a final variable that has been assigned to already.
-
_isLValue
protected boolean _isLValue(ASTExpression expr)
-
init
public static void init()
-
reset
public static void reset()
-
setDelegate
protected static void setDelegate(LValueRelations newDelegate)
-
getDelegate
protected static LValueRelations getDelegate()
-
-