Class ThrownExceptionSwitch
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- org.eclipse.xtext.xbase.util.XbaseSwitch<java.lang.Boolean>
-
- org.eclipse.xtext.xbase.typesystem.util.ThrownExceptionSwitch
-
public class ThrownExceptionSwitch extends XbaseSwitch<java.lang.Boolean>
-
-
Field Summary
-
Fields inherited from class org.eclipse.xtext.xbase.util.XbaseSwitch
modelPackage
-
-
Constructor Summary
Constructors Constructor Description ThrownExceptionSwitch(IThrownExceptionDelegate delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaccept(org.eclipse.xtext.common.types.JvmExecutable executable)protected voidaccept(LightweightTypeReference type)java.lang.BooleancaseXAbstractFeatureCall(XAbstractFeatureCall object)Returns the result of interpreting the object as an instance of 'XAbstract Feature Call'.java.lang.BooleancaseXCasePart(XCasePart object)Returns the result of interpreting the object as an instance of 'XCase Part'.java.lang.BooleancaseXCatchClause(XCatchClause object)Returns the result of interpreting the object as an instance of 'XCatch Clause'.java.lang.BooleancaseXClosure(XClosure object)Returns the result of interpreting the object as an instance of 'XClosure'.java.lang.BooleancaseXConstructorCall(XConstructorCall object)Returns the result of interpreting the object as an instance of 'XConstructor Call'.java.lang.BooleancaseXExpression(XExpression object)Returns the result of interpreting the object as an instance of 'XExpression'.java.lang.BooleancaseXThrowExpression(XThrowExpression object)Returns the result of interpreting the object as an instance of 'XThrow Expression'.java.lang.BooleancaseXTryCatchFinallyExpression(XTryCatchFinallyExpression object)Returns the result of interpreting the object as an instance of 'XTry Catch Finally Expression'.java.lang.BooleandefaultCase(org.eclipse.emf.ecore.EObject object)Returns the result of interpreting the object as an instance of 'EObject'.protected org.eclipse.xtext.common.types.JvmOperationfindCloseMethod(LightweightTypeReference resourceType)protected LightweightTypeReferencegetType(XExpression expr)protected voidprocessExceptionsFromAutoclosable(java.util.List<XVariableDeclaration> resources, IThrownExceptionDelegate thrownExceptionDelegate)Checks if the automatically called close method of resources in try block (implementing AutoCloseable) throws exceptions.-
Methods inherited from class org.eclipse.xtext.xbase.util.XbaseSwitch
caseJvmIdentifiableElement, caseXAbstractWhileExpression, caseXAssignment, caseXBasicForLoopExpression, caseXBinaryOperation, caseXBlockExpression, caseXBooleanLiteral, caseXCastedExpression, caseXCollectionLiteral, caseXDoWhileExpression, caseXFeatureCall, caseXForLoopExpression, caseXIfExpression, caseXInstanceOfExpression, caseXListLiteral, caseXMemberFeatureCall, caseXNullLiteral, caseXNumberLiteral, caseXPostfixOperation, caseXReturnExpression, caseXSetLiteral, caseXStringLiteral, caseXSwitchExpression, caseXSynchronizedExpression, caseXTypeLiteral, caseXUnaryOperation, caseXVariableDeclaration, caseXWhileExpression, doSwitch, isSwitchFor
-
-
-
-
Constructor Detail
-
ThrownExceptionSwitch
public ThrownExceptionSwitch(IThrownExceptionDelegate delegate)
-
-
Method Detail
-
accept
protected void accept(LightweightTypeReference type)
-
getType
protected LightweightTypeReference getType(XExpression expr)
-
defaultCase
public java.lang.Boolean defaultCase(org.eclipse.emf.ecore.EObject object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway.- Overrides:
defaultCasein classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'EObject'.
- See Also:
Switch.doSwitch(org.eclipse.emf.ecore.EObject)
-
caseXExpression
public java.lang.Boolean caseXExpression(XExpression object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XExpression'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXExpressionin classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XExpression'.
- See Also:
doSwitch(EObject)
-
caseXClosure
public java.lang.Boolean caseXClosure(XClosure object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XClosure'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXClosurein classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XClosure'.
- See Also:
doSwitch(EObject)
-
caseXCasePart
public java.lang.Boolean caseXCasePart(XCasePart object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XCase Part'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXCasePartin classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XCase Part'.
- See Also:
doSwitch(EObject)
-
caseXThrowExpression
public java.lang.Boolean caseXThrowExpression(XThrowExpression object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XThrow Expression'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXThrowExpressionin classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XThrow Expression'.
- See Also:
doSwitch(EObject)
-
caseXCatchClause
public java.lang.Boolean caseXCatchClause(XCatchClause object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XCatch Clause'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXCatchClausein classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XCatch Clause'.
- See Also:
doSwitch(EObject)
-
caseXTryCatchFinallyExpression
public java.lang.Boolean caseXTryCatchFinallyExpression(XTryCatchFinallyExpression object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XTry Catch Finally Expression'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXTryCatchFinallyExpressionin classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XTry Catch Finally Expression'.
- See Also:
doSwitch(EObject)
-
processExceptionsFromAutoclosable
protected void processExceptionsFromAutoclosable(java.util.List<XVariableDeclaration> resources, IThrownExceptionDelegate thrownExceptionDelegate)
Checks if the automatically called close method of resources in try block (implementing AutoCloseable) throws exceptions. Add those those exceptions to the list of the thrownExceptionDelegate.- Parameters:
resources- the resources of the try statementthrownExceptionDelegate- the (filtered) delegate holding the utilities- Since:
- 2.18
-
findCloseMethod
protected org.eclipse.xtext.common.types.JvmOperation findCloseMethod(LightweightTypeReference resourceType)
- Since:
- 2.18
-
caseXAbstractFeatureCall
public java.lang.Boolean caseXAbstractFeatureCall(XAbstractFeatureCall object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XAbstract Feature Call'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXAbstractFeatureCallin classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XAbstract Feature Call'.
- See Also:
doSwitch(EObject)
-
caseXConstructorCall
public java.lang.Boolean caseXConstructorCall(XConstructorCall object)
Description copied from class:XbaseSwitchReturns the result of interpreting the object as an instance of 'XConstructor Call'. This implementation returns null; returning a non-null result will terminate the switch.- Overrides:
caseXConstructorCallin classXbaseSwitch<java.lang.Boolean>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'XConstructor Call'.
- See Also:
doSwitch(EObject)
-
accept
protected void accept(org.eclipse.xtext.common.types.JvmExecutable executable)
-
-