io.sarl.lang.controlflow
Interface ISarlEarlyExitComputer
All Superinterfaces:
org.eclipse.xtext.xbase.controlflow.IEarlyExitComputer
All Known Implementing Classes:
SARLEarlyExitComputer
interface ISarlEarlyExitComputer
implements org.eclipse.xtext.xbase.controlflow.IEarlyExitComputer
Compute the early-exit flag for the SARL statements.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Action Summary
Modifier and type Action and description
abstract boolean isEarlyExitAnnotatedElement(Object)
Replies if the given statement is annotated with the "early-exit" annotation.
abstract boolean isEarlyExitEvent(JvmTypeReference)
Replies if the given event is an event that causes an early exit of the function was is calling the firing function.
abstract boolean isEarlyExitInJava(XExpression)
An expression is considered to be left early if all branches end with an explicit termination, e.g. a return or throw expression.
abstract boolean isEarlyExitLoop(XExpression)
Replies if the given expression causes an early exist from a loop.
abstract boolean isEarlyExitOperation(SarlAction)
Replies if the given operation causes an early exist within its caller.
Action Details
isEarlyExitAnnotatedElement(Object)
def isEarlyExitAnnotatedElement(Object) : boolean
Replies if the given statement is annotated with the "early-exit" annotation.
Parameters:
element - the element to test.
Returns:
true if the given element is annotated with the "early-flag" annotation, otherwise false .
isEarlyExitEvent(JvmTypeReference)
def isEarlyExitEvent(JvmTypeReference) : boolean
Replies if the given event is an event that causes an early exit of the function was is calling the firing function.
Parameters:
reference - the event reference.
Returns:
true if the event may causes early exit of the function, otherwise false .
isEarlyExitInJava(XExpression)
def isEarlyExitInJava(XExpression) : boolean
An expression is considered to be left early if all branches end with an explicit termination, e.g. a return or throw expression. This functions take care only of the Java and Xbase early exit, not the SARL-specific early exist expressions.
Parameters:
expression - the expression to test.
Returns:
true if the given expression will definitely exit early in Java or Xbase.
Since:
0.8
isEarlyExitLoop(XExpression)
def isEarlyExitLoop(XExpression) : boolean
Replies if the given expression causes an early exist from a loop.
Parameters:
expression - the expression.
Returns:
true if the expression causes early exit of the loop statement, otherwise false .
Since:
0.5
isEarlyExitOperation(SarlAction)
def isEarlyExitOperation(SarlAction) : boolean
Replies if the given operation causes an early exist within its caller.
Parameters:
operation - the operation.
Returns:
true if the operation causes early exit of the caller, otherwise false .
Since:
0.7