private boolean matches(IMethodBinding binding) { if (binding == null) return false; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i = 0; i < exceptions.length; i++) { ITypeBinding exception= exceptions[i]; if(matches(exception)) return true; } return false; }
private boolean matches(IMethodBinding binding) { if (binding == null) return false; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i = 0; i < exceptions.length; i++) { ITypeBinding exception= exceptions[i]; if(matches(exception)) return true; } return false; }
private boolean handleExceptions(IMethodBinding binding) { if (binding == null) return true; addExceptions(binding.getExceptionTypes()); return true; } }
private boolean handleExceptions(IMethodBinding binding, AST ast) { if (binding == null) return true; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { addException(exceptions[i]); } return true; }
private boolean matches(IMethodBinding binding) { if (binding == null) return false; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i = 0; i < exceptions.length; i++) { ITypeBinding exception= exceptions[i]; if(matches(exception)) return true; } return false; }
private boolean isExitPoint(IMethodBinding binding) { if (binding == null) return false; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { if (!isCatched(exceptions[i])) return true; } return false; }
private boolean isExitPoint(IMethodBinding binding) { if (binding == null) return false; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { if (!isCaught(exceptions[i])) return true; } return false; }
private boolean handleExceptions(IMethodBinding binding, ASTNode node) { if (binding == null) return true; addExceptions(binding.getExceptionTypes(), node.getAST()); return true; } }
private boolean handleExceptions(IMethodBinding binding, ASTNode node) { if (binding == null) return true; addExceptions(binding.getExceptionTypes(), node.getAST()); return true; } }
private boolean handleExceptions(IMethodBinding binding, ASTNode node) { if (binding == null) { return true; } ITypeBinding[] exceptions = binding.getExceptionTypes(); for (int i = 0; i < exceptions.length; i++) { addException(exceptions[i], node.getAST()); } return true; }
private boolean handleExceptions(IMethodBinding binding, ASTNode node) { if (binding == null) { return true; } addExceptions(binding.getExceptionTypes(), node.getAST()); return true; } }
private boolean handleExceptions(IMethodBinding binding, ASTNode node) { if (binding == null) return true; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { addException(exceptions[i], node.getAST()); } return true; }
private boolean handleExceptions(IMethodBinding binding, ASTNode node) { if (binding == null) return true; ITypeBinding[] exceptions= binding.getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { addException(exceptions[i], node.getAST()); } return true; }
private void addExceptionsToNewConstructor(MethodDeclaration newConstructor, ImportRewrite importRewrite) { IMethodBinding constructorBinding= getSuperConstructorBinding(); if (constructorBinding == null) return; ITypeBinding[] exceptions= constructorBinding.getExceptionTypes(); for (int i= 0; i < exceptions.length; i++) { Type exceptionType= importRewrite.addImport(exceptions[i], fAnonymousInnerClassNode.getAST()); newConstructor.thrownExceptionTypes().add(exceptionType); } }
private void copyExceptions(MethodDeclaration intermediary, CompilationUnitRewrite imRewrite, ImportRewriteContext context) { ITypeBinding[] exceptionTypes= fTargetMethodBinding.getExceptionTypes(); for (int i= 0; i < exceptionTypes.length; i++) { Type exceptionType= imRewrite.getImportRewrite().addImport(exceptionTypes[i], imRewrite.getAST(), context); intermediary.thrownExceptionTypes().add(exceptionType); } }
@Override protected void addNewExceptions(ASTRewrite rewrite, List<Type> exceptions, ImportRewriteContext context) throws CoreException { AST ast= rewrite.getAST(); ImportRewrite importRewrite= getImportRewrite(); ITypeBinding[] bindings= fMethod.getExceptionTypes(); for (int i= 0; i < bindings.length; i++) { Type newType= importRewrite.addImport(bindings[i], ast, context, TypeLocation.EXCEPTION); exceptions.add(newType); addLinkedPosition(rewrite.track(newType), false, "exc_type_" + i); //$NON-NLS-1$ } }
@Override protected void addNewExceptions(ASTRewrite rewrite, List<Type> exceptions) throws CoreException { AST ast= rewrite.getAST(); ImportRewrite importRewrite= getImportRewrite(); ITypeBinding[] bindings= fMethod.getExceptionTypes(); for (int i= 0; i < bindings.length; i++) { Type newType= importRewrite.addImport(bindings[i], ast); exceptions.add(newType); addLinkedPosition(rewrite.track(newType), false, "exc_type_" + i); //$NON-NLS-1$ } }
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)); } }
protected void addNewExceptions(ASTRewrite rewrite, List exceptions) throws CoreException { AST ast= rewrite.getAST(); ImportRewrite importRewrite= getImportRewrite(); ITypeBinding[] bindings= fMethod.getExceptionTypes(); for (int i= 0; i < bindings.length; i++) { String typeName= importRewrite.addImport(bindings[i]); Name newNode= ASTNodeFactory.newName(ast, typeName); exceptions.add(newNode); addLinkedPosition(rewrite.track(newNode), false, "exc_type_" + i); //$NON-NLS-1$ } }