|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.jmlspecs.checker.JmlContext
org.jmlspecs.checker.JmlMethodContext
This class represents the context for a method during checking passes (checkInterface, checkInitializers, typecheck).
CContextType| Field Summary |
| Fields inherited from class org.jmlspecs.checker.JmlContext |
cunit, delegee, parent |
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
protected |
JmlMethodContext(CContextType parent)
|
(package private) |
JmlMethodContext(CContextType parent,
CMethod self)
Create a context in which to check a method. |
| Method Summary | |
void |
addThrowable(CThrowableInfo throwable)
Registers that the given throwable can be thrown within this context. |
CFlowControlContextType |
createFlowControlContext(int localVars,
boolean isInExternalGF,
TokenReference where)
|
CFlowControlContextType |
createFlowControlContext(int localVars,
TokenReference where)
|
CMethod |
getCMethod()
Returns the signature of the method declaration in which this context is enclosed, or null if this context is not enclosed in a method declaration. |
CMethodContextType |
getMethodContext()
Returns the nearest surrounding context of type CMethodContext. |
boolean |
isInConstructor()
Indicates whether this context is enclosed in a constructor. |
boolean |
isInInitializer()
Indicates whether this context is enclosed in an instance or static initializer. |
boolean |
isPure()
Indicates whether this context is "pure". |
boolean |
isStatic()
Indicates whether this context is "static". |
CTypeVariable |
lookupTypeVariable(String ident)
search for type variable that are accessible |
Set |
throwables()
|
void |
verifyExceptions(TokenReference ref)
Verifies that all checked exceptions are defined in the throw list. |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
JmlMethodContext(CContextType parent,
CMethod self)
CClassContextType.createMethodContext.
requires (* \caller instanceof CContextType *);
parent - the parent contextself - the corresponding method interfaceCClassContextType.createMethodContext(CMethod)protected JmlMethodContext(CContextType parent)
| Method Detail |
public void verifyExceptions(TokenReference ref)
throws PositionedError
verifyExceptions in interface CMethodContextTypePositionedError - if checks fail
public CFlowControlContextType createFlowControlContext(int localVars,
TokenReference where)
createFlowControlContext in interface CMethodContextType
public CFlowControlContextType createFlowControlContext(int localVars,
boolean isInExternalGF,
TokenReference where)
createFlowControlContext in interface CMethodContextTypepublic CMethod getCMethod()
getCMethod in interface CMethodContextTypegetCMethod in class JmlContextpublic CMethodContextType getMethodContext()
getMethodContext in interface CMethodContextTypegetMethodContext in class JmlContext
public CTypeVariable lookupTypeVariable(String ident)
throws UnpositionedError
CContextType
lookupTypeVariable in interface CContextTypelookupTypeVariable in class JmlContextUnpositionedErrorpublic boolean isInInitializer()
isInInitializer in interface CMethodContextTypeisInInitializer in class JmlContextpublic boolean isInConstructor()
isInConstructor in interface CMethodContextTypeisInConstructor in class JmlContextpublic boolean isStatic()
isStatic in interface CMethodContextTypeisStatic in class JmlContextpublic boolean isPure()
isPure in interface CMethodContextTypeisPure in class JmlContextpublic void addThrowable(CThrowableInfo throwable)
CMethodContextType
addThrowable in interface CMethodContextTypethrowable - the type of the new throwablepublic Set throwables()
throwables in interface CMethodContextType
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||