|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.mjc.CContext
org.multijava.mjc.CMethodContext
This class represents the context for a method during checking passes (checkInterface, checkInitializers, typecheck).
CContextType| Field Summary | |
protected Hashtable |
labels
|
private CMethod |
self
|
protected HashSet |
throwables
|
| Fields inherited from class org.multijava.mjc.CContext |
contextNullity, cunit, parent |
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
CMethodContext(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 CMethodContextType. |
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 |
| Field Detail |
protected HashSet throwables
protected Hashtable labels
private CMethod self
| Constructor Detail |
public CMethodContext(CContextType parent,
CMethod self)
CClassContextType.createMethodContext.
requires (* \caller instanceof CContextType *);
parent - the parent contextself - the corresponding method interfaceCClassContextType.createMethodContext(CMethod)| Method Detail |
public void verifyExceptions(TokenReference ref)
throws PositionedError
verifyExceptions in interface CMethodContextTypePositionedError - if checks fail
public CTypeVariable lookupTypeVariable(String ident)
throws UnpositionedError
CContextType
lookupTypeVariable in interface CContextTypelookupTypeVariable in class CContextUnpositionedError
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 CContextpublic CMethodContextType getMethodContext()
getMethodContext in interface CMethodContextTypegetMethodContext in class CContextpublic boolean isInInitializer()
isInInitializer in interface CMethodContextTypeisInInitializer in class CContextpublic boolean isInConstructor()
isInConstructor in interface CMethodContextTypeisInConstructor in class CContextpublic boolean isStatic()
isStatic in interface CMethodContextTypeisStatic in class CContextpublic boolean isPure()
isPure in interface CMethodContextTypeisPure in class CContextpublic void addThrowable(CThrowableInfo throwable)
addThrowable in interface CMethodContextTypethrowable - the type of the new throwable public Set throwables()
throwables in interface CMethodContextType
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||