/** * Internal synonym for {@link MethodDeclaration#thrownExceptions()}. Use to alleviate * deprecation warnings. * @deprecated * @since 3.10 */ private static List thrownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal synonym for {@link MethodDeclaration#thrownExceptions()}. Use to alleviate * deprecation warnings. * @deprecated * @since 3.10 */ private static List thrownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings * * @param node * @deprecated */ private static List internalThownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings * * @param node * @deprecated */ private static List internalThownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal synonym for {@link MethodDeclaration#thrownExceptions()}. Use to alleviate * deprecation warnings. * @deprecated * @since 3.10 */ private static List thrownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings * * @param node * @deprecated */ private static List internalThownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal synonym for {@link MethodDeclaration#thrownExceptions()}. Use to alleviate * deprecation warnings. * @deprecated * @since 3.10 */ private static List thrownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings * * @param node * @deprecated */ private static List internalThownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * Internal synonym for {@link MethodDeclaration#thrownExceptions()}. Use to alleviate * deprecation warnings. * @deprecated * @since 3.10 */ private static List thrownExceptions(MethodDeclaration node) { return node.thrownExceptions(); }
/** * @param decl method declaration * @return thrown exception names * @deprecated to avoid deprecation warnings */ @Deprecated private static List<Name> getThrownExceptions(MethodDeclaration decl) { return decl.thrownExceptions(); }
/** * @param decl method declaration * @return thrown exception names * @deprecated to avoid deprecation warnings */ @Deprecated private static List<Name> getThrownExceptions(MethodDeclaration decl) { return decl.thrownExceptions(); }
/** * @param decl method declaration * @return thrown exception names * @deprecated to avoid deprecation warnings */ @Deprecated private static List<Name> getThrownExceptions(MethodDeclaration decl) { return decl.thrownExceptions(); }
protected static void copyThrownExceptions(final MethodDeclaration oldMethod, final MethodDeclaration newMethod) { final AST ast= newMethod.getAST(); for (int index= 0, n= oldMethod.thrownExceptions().size(); index < n; index++) newMethod.thrownExceptions().add(index, ASTNode.copySubtree(ast, (Name) oldMethod.thrownExceptions().get(index))); }
private void mapDeclaredExceptions(BodyDeclaration bodyDecl, CSMember member) { if (!(bodyDecl instanceof MethodDeclaration)) return; MethodDeclaration method = (MethodDeclaration) bodyDecl; mapThrownExceptions(method.thrownExceptions(), member); }
/** * Add an exception type to those thrown by the method. * * @param type exception type */ public void addThrows(String type) { m_method.thrownExceptions().add(m_source.createTypeName(type)); }
private boolean methodThrowsException(MethodDeclaration method, Name exception) { ASTMatcher matcher = new ASTMatcher(); for (Iterator iter = method.thrownExceptions().iterator(); iter.hasNext();) { Name thrown = (Name)iter.next(); if (exception.subtreeMatch(matcher, thrown)) return true; } return false; }
private void changeExceptions() { for (Iterator iter= fExceptionInfos.iterator(); iter.hasNext();) { ExceptionInfo info= (ExceptionInfo) iter.next(); if (info.isOld()) continue; if (info.isDeleted()) removeExceptionFromNodeList(info, fMethDecl.thrownExceptions()); else addExceptionToNodeList(info, getASTRewrite().getListRewrite(fMethDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY)); } }
private void addExceptionsToNewConstructor(MethodDeclaration newConstructor) { IMethodBinding constructorBinding= getSuperConstructorBinding(); if (constructorBinding == null) return; ITypeBinding[] exceptions= constructorBinding.getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { Name exceptionTypeName= fAnonymousInnerClassNode.getAST().newName(Bindings.getNameComponents(exceptions[i])); newConstructor.thrownExceptions().add(exceptionTypeName); } }
private void copyExceptions(MethodDeclaration intermediary, CompilationUnitRewrite imRewrite) { ITypeBinding[] exceptionTypes= fTargetMethodBinding.getExceptionTypes(); for (int i= 0; i < exceptionTypes.length; i++) { final String qualifiedName= imRewrite.getImportRewrite().addImport(exceptionTypes[i]); intermediary.thrownExceptions().add(ASTNodeFactory.newName(imRewrite.getAST(), qualifiedName)); } }
public void endVisit(MethodDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getReturnType2()); process(info, node.parameters()); process(info, node.thrownExceptions()); process(info, node.getBody()); }