|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aspectj.compiler.base.ast.ControlContext
A representation of the control context, the lexical context of statements that affect control flow. This is used to handle the control issues arising from labeled statements, breaks and continues, returns and throws, tries and continues, loops (for, while, do), and switches.
LabeledStmt
,
WhileStmt
,
DoStmt
,
ForStmt
,
SwitchStmt
,
WindingStmt
,
TryStmt
,
SynchronizedStmt
,
BreakStmt
,
ContinueStmt
,
ReturnStmt
,
ThrowStmt
Constructor Summary | |
ControlContext()
|
Method Summary | |
void |
enter(Stmt s)
Enters the context of a control-effecting statement. |
void |
exit()
Exits the context of a previously-entered control-effecting statement. |
Stmt |
getBreakTarget(java.lang.String label)
Returns the target statement of a break statement. |
Stmt |
getContinueTarget(java.lang.String label)
Returns the target statement of a continue statement. |
java.util.Iterator |
getWindsUntil(Stmt end)
Returns an iterator view of the winding statements up to a control target. |
boolean |
isLabelUsed(java.lang.String label)
Returns true if a LabeledStmt with a
label is in the context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ControlContext()
Method Detail |
public void enter(Stmt s)
public void exit()
public Stmt getBreakTarget(java.lang.String label)
label
- label of break statement, or null
java.util.NoSuchElementException
- there is no targetpublic Stmt getContinueTarget(java.lang.String label)
label
- label of continue statement, or null
java.util.NoSuchElementException
- there is no target
java.lang.UnsupportedOperationException
- the target is not continuablepublic boolean isLabelUsed(java.lang.String label)
LabeledStmt
with a
label is in the context.
label
- label to check for.
public java.util.Iterator getWindsUntil(Stmt end)
end
- the control-effecting statement enclosing the winding statements.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |