/** * Returns the extracted methods from the compilation unit except the default methods. * * @param unit the compilation unit * @return the extracted methods except the default method * @throws JavaModelException if the element does not exist */ protected final IMethod[] getExtractedMethods(final ICompilationUnit unit) throws JavaModelException { Assert.isNotNull(unit); final List<IJavaElement> list= new ArrayList<>(); for (int index= 0; index < fMembers.length; index++) { if (fMembers[index] instanceof IMethod) { final IJavaElement element= JavaModelUtil.findInCompilationUnit(unit, fMembers[index]); if (element instanceof IMethod && !JdtFlags.isDefaultMethod((IMethod) element)) list.add(element); } } return list.toArray(new IMethod[list.size()]); }
/** * Returns the extracted methods from the compilation unit except the default methods. * * @param unit the compilation unit * @return the extracted methods except the default method * @throws JavaModelException if the element does not exist */ protected final IMethod[] getExtractedMethods(final ICompilationUnit unit) throws JavaModelException { Assert.isNotNull(unit); final List<IJavaElement> list= new ArrayList<>(); for (int index= 0; index < fMembers.length; index++) { if (fMembers[index] instanceof IMethod) { final IJavaElement element= JavaModelUtil.findInCompilationUnit(unit, fMembers[index]); if (element instanceof IMethod && !JdtFlags.isDefaultMethod((IMethod) element)) list.add(element); } } return list.toArray(new IMethod[list.size()]); }
public static boolean isMoveMethodAvailable(final IMethod method) throws JavaModelException { return method.exists() && !method.isConstructor() && !method.isBinary() && !method.isReadOnly() && !JdtFlags.isStatic(method) && (JdtFlags.isDefaultMethod(method) || !method.getDeclaringType().isInterface()); }
public static boolean isMoveMethodAvailable(final IMethod method) throws JavaModelException { return method.exists() && !method.isConstructor() && !method.isBinary() && !method.isReadOnly() && !JdtFlags.isStatic(method) && (JdtFlags.isDefaultMethod(method) || !method.getDeclaringType().isInterface()); }
public static boolean isMoveMethodAvailable(final IMethod method) throws JavaModelException { return method.exists() && !method.isConstructor() && !method.isBinary() && !method.isReadOnly() && !JdtFlags.isStatic(method) && (JdtFlags.isDefaultMethod(method) || !method.getDeclaringType().isInterface()); }
final Modifier.ModifierKeyword keyword= same ? null : Modifier.ModifierKeyword.PUBLIC_KEYWORD; ModifierRewrite modifierRewrite= ModifierRewrite.create(rewrite, declaration); if (JdtFlags.isDefaultMethod(binding) && getTargetType().isClass()) { } else if (!JdtFlags.isDefaultMethod(binding) && getTargetType().isInterface()) {
final Modifier.ModifierKeyword keyword= same ? null : Modifier.ModifierKeyword.PUBLIC_KEYWORD; ModifierRewrite modifierRewrite= ModifierRewrite.create(rewrite, declaration); if (JdtFlags.isDefaultMethod(binding) && getTargetType().isClass()) { } else if (!JdtFlags.isDefaultMethod(binding) && getTargetType().isInterface()) {