Java Code Examples for org.eclipse.xtext.xbase.validation.ImplicitReturnFinder#Acceptor
The following examples show how to use
org.eclipse.xtext.xbase.validation.ImplicitReturnFinder#Acceptor .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected void _findImplicitReturns(final XSwitchExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { final Consumer<XCasePart> _function = (XCasePart it) -> { this.findImplicitReturns(it.getThen(), acceptor); }; expression.getCases().forEach(_function); this.findImplicitReturns(expression.getDefault(), acceptor); }
Example 2
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected void _findImplicitReturns(final XTryCatchFinallyExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { this.findImplicitReturns(expression.getExpression(), acceptor); final Consumer<XCatchClause> _function = (XCatchClause it) -> { this.findImplicitReturns(it.getExpression(), acceptor); }; expression.getCatchClauses().forEach(_function); }
Example 3
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XAbstractFeatureCall expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 4
Source File: XtendImplicitReturnFinder.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final AnonymousClass expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 5
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
public void findImplicitReturns(final XExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { if (expression instanceof XAbstractFeatureCall) { _findImplicitReturns((XAbstractFeatureCall)expression, acceptor); return; } else if (expression instanceof XBlockExpression) { _findImplicitReturns((XBlockExpression)expression, acceptor); return; } else if (expression instanceof XBooleanLiteral) { _findImplicitReturns((XBooleanLiteral)expression, acceptor); return; } else if (expression instanceof XCastedExpression) { _findImplicitReturns((XCastedExpression)expression, acceptor); return; } else if (expression instanceof XClosure) { _findImplicitReturns((XClosure)expression, acceptor); return; } else if (expression instanceof XCollectionLiteral) { _findImplicitReturns((XCollectionLiteral)expression, acceptor); return; } else if (expression instanceof XConstructorCall) { _findImplicitReturns((XConstructorCall)expression, acceptor); return; } else if (expression instanceof XIfExpression) { _findImplicitReturns((XIfExpression)expression, acceptor); return; } else if (expression instanceof XInstanceOfExpression) { _findImplicitReturns((XInstanceOfExpression)expression, acceptor); return; } else if (expression instanceof XNullLiteral) { _findImplicitReturns((XNullLiteral)expression, acceptor); return; } else if (expression instanceof XNumberLiteral) { _findImplicitReturns((XNumberLiteral)expression, acceptor); return; } else if (expression instanceof XStringLiteral) { _findImplicitReturns((XStringLiteral)expression, acceptor); return; } else if (expression instanceof XSwitchExpression) { _findImplicitReturns((XSwitchExpression)expression, acceptor); return; } else if (expression instanceof XSynchronizedExpression) { _findImplicitReturns((XSynchronizedExpression)expression, acceptor); return; } else if (expression instanceof XTryCatchFinallyExpression) { _findImplicitReturns((XTryCatchFinallyExpression)expression, acceptor); return; } else if (expression instanceof XTypeLiteral) { _findImplicitReturns((XTypeLiteral)expression, acceptor); return; } else if (expression != null) { _findImplicitReturns(expression, acceptor); return; } else if (expression == null) { _findImplicitReturns((Void)null, acceptor); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(expression, acceptor).toString()); } }
Example 6
Source File: XtendImplicitReturnFinder.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final RichString expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 7
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XSynchronizedExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { this.findImplicitReturns(expression.getExpression(), acceptor); }
Example 8
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XBlockExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { this.findImplicitReturns(IterableExtensions.<XExpression>last(expression.getExpressions()), acceptor); }
Example 9
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XCastedExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 10
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XInstanceOfExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 11
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final Void expression, final ImplicitReturnFinder.Acceptor acceptor) { }
Example 12
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XConstructorCall expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 13
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XClosure expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 14
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XTypeLiteral expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 15
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XNullLiteral expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 16
Source File: XtendImplicitReturnFinder.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public void findImplicitReturns(final XExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { if (expression instanceof AnonymousClass) { _findImplicitReturns((AnonymousClass)expression, acceptor); return; } else if (expression instanceof RichString) { _findImplicitReturns((RichString)expression, acceptor); return; } else if (expression instanceof XAbstractFeatureCall) { _findImplicitReturns((XAbstractFeatureCall)expression, acceptor); return; } else if (expression instanceof XBlockExpression) { _findImplicitReturns((XBlockExpression)expression, acceptor); return; } else if (expression instanceof XBooleanLiteral) { _findImplicitReturns((XBooleanLiteral)expression, acceptor); return; } else if (expression instanceof XCastedExpression) { _findImplicitReturns((XCastedExpression)expression, acceptor); return; } else if (expression instanceof XClosure) { _findImplicitReturns((XClosure)expression, acceptor); return; } else if (expression instanceof XCollectionLiteral) { _findImplicitReturns((XCollectionLiteral)expression, acceptor); return; } else if (expression instanceof XConstructorCall) { _findImplicitReturns((XConstructorCall)expression, acceptor); return; } else if (expression instanceof XIfExpression) { _findImplicitReturns((XIfExpression)expression, acceptor); return; } else if (expression instanceof XInstanceOfExpression) { _findImplicitReturns((XInstanceOfExpression)expression, acceptor); return; } else if (expression instanceof XNullLiteral) { _findImplicitReturns((XNullLiteral)expression, acceptor); return; } else if (expression instanceof XNumberLiteral) { _findImplicitReturns((XNumberLiteral)expression, acceptor); return; } else if (expression instanceof XStringLiteral) { _findImplicitReturns((XStringLiteral)expression, acceptor); return; } else if (expression instanceof XSwitchExpression) { _findImplicitReturns((XSwitchExpression)expression, acceptor); return; } else if (expression instanceof XSynchronizedExpression) { _findImplicitReturns((XSynchronizedExpression)expression, acceptor); return; } else if (expression instanceof XTryCatchFinallyExpression) { _findImplicitReturns((XTryCatchFinallyExpression)expression, acceptor); return; } else if (expression instanceof XTypeLiteral) { _findImplicitReturns((XTypeLiteral)expression, acceptor); return; } else if (expression != null) { _findImplicitReturns(expression, acceptor); return; } else if (expression == null) { _findImplicitReturns((Void)null, acceptor); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(expression, acceptor).toString()); } }
Example 17
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XCollectionLiteral expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 18
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XBooleanLiteral expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 19
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XNumberLiteral expression, final ImplicitReturnFinder.Acceptor acceptor) { acceptor.accept(expression); }
Example 20
Source File: XbaseImplicitReturnFinder.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
protected void _findImplicitReturns(final XExpression expression, final ImplicitReturnFinder.Acceptor acceptor) { }