Class DefaultEarlyExitComputer
- java.lang.Object
-
- org.eclipse.xtext.xbase.controlflow.DefaultEarlyExitComputer
-
- All Implemented Interfaces:
IEarlyExitComputer
public class DefaultEarlyExitComputer extends java.lang.Object implements IEarlyExitComputer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.xbase.controlflow.IEarlyExitComputer
IEarlyExitComputer.ExitPoint
-
-
Constructor Summary
Constructors Constructor Description DefaultEarlyExitComputer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XAbstractFeatureCall expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XBasicForLoopExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XBlockExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XConstructorCall expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XDoWhileExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XForLoopExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XIfExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XReturnExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XSwitchExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XSynchronizedExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XThrowExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XTryCatchFinallyExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XVariableDeclaration expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>_exitPoints(XWhileExpression expression)protected java.util.Collection<IEarlyExitComputer.ExitPoint>exitPoints(XExpression expression)java.util.Collection<IEarlyExitComputer.ExitPoint>getExitPoints(XExpression expression)protected booleanisBooleanConstant(XExpression expression, boolean value)booleanisEarlyExit(XExpression expression)An expression is considered to be left early if all branches end with an explicit termination, e.g.protected booleanisNotEmpty(java.util.Collection<IEarlyExitComputer.ExitPoint> exitPoints)
-
-
-
Method Detail
-
isEarlyExit
public boolean isEarlyExit(XExpression expression)
Description copied from interface:IEarlyExitComputerAn expression is considered to be left early if all branches end with an explicit termination, e.g. a return or throw expression.- Specified by:
isEarlyExitin interfaceIEarlyExitComputer- Returns:
trueif the given expression will definitely exit early.
-
isNotEmpty
protected boolean isNotEmpty(java.util.Collection<IEarlyExitComputer.ExitPoint> exitPoints)
-
getExitPoints
public java.util.Collection<IEarlyExitComputer.ExitPoint> getExitPoints(XExpression expression)
- Specified by:
getExitPointsin interfaceIEarlyExitComputer
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XExpression expression)
- Parameters:
expression- unused in this context but required in dispatch signature
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XReturnExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XThrowExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XBlockExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XBasicForLoopExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XForLoopExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XWhileExpression expression)
-
isBooleanConstant
protected boolean isBooleanConstant(XExpression expression, boolean value)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XDoWhileExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XVariableDeclaration expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XIfExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XSwitchExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XAbstractFeatureCall expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XConstructorCall expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XTryCatchFinallyExpression expression)
-
_exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> _exitPoints(XSynchronizedExpression expression)
-
exitPoints
protected java.util.Collection<IEarlyExitComputer.ExitPoint> exitPoints(XExpression expression)
-
-