org.multijava.mjc
Interface CExpressionContextType
- All Superinterfaces:
- CContextType
- All Known Implementing Classes:
- CExpressionContext, JmlExpressionContext
- public interface CExpressionContextType
- extends CContextType
This class represents the context for an expression during checking
passes (checkInterface, checkInitializers, typecheck).
- See Also:
CContextType
|
Method Summary |
boolean |
discardValue()
|
boolean |
isIncDec()
|
boolean |
isLeftSide()
|
void |
setArithmeticMode(byte arithmeticMode)
|
void |
setDiscardValue(boolean discardValue)
set this context as a discarded value so result is ignored |
void |
setIncDec(boolean incDec)
Set this context as an increment or decrement expression, so
we can generate appropriate getters and setters if necessary
(and also generate proper code in the future). |
void |
setLeftSide(boolean leftSide)
Set this context as a left side in an assignment, so access to vars
may be uninitialized |
| Methods inherited from interface org.multijava.mjc.CContextType |
arithmeticMode, catchUp, check, check, check, check, classToGenerate, createClassContext, createExtMethodContext, createInterfaceContext, declaredOutsideOfLoop, declares, fail, fail, findNearestHost, getClassContext, getCMethod, getCompilationUnit, getCompiler, getFlowControlContext, getMethodContext, getParentContext, initializeField, isBeforeSuperConstructorCall, isFieldDefinitelyAssigned, isInConstructor, isInInitializer, isInLoop, isPure, isStatic, lookupClass, lookupField, lookupField, lookupLocalVariable, lookupMethod, lookupMethod, lookupMethodOrSet, lookupMethodOrSet, lookupOuterField, lookupOuterField, lookupOuterLocalVariable, lookupTypeVariable, modUtil, registerGFDecl, registerVisibleMethod, registerVisibleType, replaceFieldInfoUpTo, reportTrouble, resolveMaybeExtMethodRef |
setArithmeticMode
public void setArithmeticMode(byte arithmeticMode)
setIncDec
public void setIncDec(boolean incDec)
- Set this context as an increment or decrement expression, so
we can generate appropriate getters and setters if necessary
(and also generate proper code in the future).
- Parameters:
incDec -
isIncDec
public boolean isIncDec()
- Returns:
- true if this context is part of an increment or decrement
expression
setLeftSide
public void setLeftSide(boolean leftSide)
- Set this context as a left side in an assignment, so access to vars
may be uninitialized
- Parameters:
leftSide - set the side of current code flow
isLeftSide
public boolean isLeftSide()
- Returns:
- true if this context is on a left side of an assignement
setDiscardValue
public void setDiscardValue(boolean discardValue)
- set this context as a discarded value so result is ignored
- Parameters:
discardValue - is the value of this expression in
this context discarded?
discardValue
public boolean discardValue()
- Returns:
- true if the result value of this expression is discarded
JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.