Source:
protected void appendMembers(final IType type, final IProgressMonitor monitor) throws JavaModelException { try { monitor.beginTask(RefactoringCoreMessages.StubCreationOperation_creating_type_stubs, 1); for (IJavaElement c : type.getChildren()) { final IMember child= (IMember) c; final int flags= child.getFlags(); final boolean isPrivate= Flags.isPrivate(flags); final boolean isDefault= !Flags.isPublic(flags) && !Flags.isProtected(flags) && !isPrivate; final boolean stub= fStubInvisible || (!isPrivate && !isDefault); if (child instanceof IType) { if (stub || "java.lang.invoke.MethodHandle".equals(type.getFullyQualifiedName()) || "java.util.concurrent.ConcurrentHashMap$CollectionView".equals(((IType) child).getFullyQualifiedName())) appendTypeDeclaration((IType) child, new SubProgressMonitor(monitor, 1)); } else if (child instanceof IField) { if (stub && !Flags.isEnum(flags) && !Flags.isSynthetic(flags)) appendFieldDeclaration((IField) child); } else if (child instanceof IMethod) { final IMethod method= (IMethod) child; final String name= method.getElementName(); if (method.getDeclaringType().isEnum()) { final int count= method.getNumberOfParameters(); if (count == 0 && "values".equals(name)) continue; if (count == 1 && "valueOf".equals(name) && "Ljava.lang.String;".equals(method.getParameterTypes()[0])) continue; if (method.isConstructor()) continue; } boolean skip= !stub || name.equals("<clinit>"); if (method.isConstructor()) skip= false; skip= skip || Flags.isSynthetic(flags) || Flags.isBridge(flags); if (!skip) appendMethodDeclaration(method); } fBuffer.append("\n"); } } finally { monitor.done(); } }

Target:
protected void appendMembers(final IType type, final IProgressMonitor monitor) throws JavaModelException { try { monitor.beginTask(RefactoringCoreMessages.StubCreationOperation_creating_type_stubs, 1); for (IJavaElement childJavaElement : type.getChildren()) { final IMember child= (IMember) childJavaElement; final int flags= child.getFlags(); final boolean isPrivate= Flags.isPrivate(flags); final boolean isDefault= !Flags.isPublic(flags) && !Flags.isProtected(flags) && !isPrivate; final boolean stub= fStubInvisible || (!isPrivate && !isDefault); if (child instanceof IType) { if (stub || "java.lang.invoke.MethodHandle".equals(type.getFullyQualifiedName()) || "java.util.concurrent.ConcurrentHashMap$CollectionView".equals(((IType) child).getFullyQualifiedName())) appendTypeDeclaration((IType) child, new SubProgressMonitor(monitor, 1)); } else if (child instanceof IField) { if (stub && !Flags.isEnum(flags) && !Flags.isSynthetic(flags)) appendFieldDeclaration((IField) child); } else if (child instanceof IMethod) { final IMethod method= (IMethod) child; final String name= method.getElementName(); if (method.getDeclaringType().isEnum()) { final int count= method.getNumberOfParameters(); if (count == 0 && "values".equals(name)) continue; if (count == 1 && "valueOf".equals(name) && "Ljava.lang.String;".equals(method.getParameterTypes()[0])) continue; if (method.isConstructor()) continue; } boolean skip= !stub || name.equals("<clinit>"); if (method.isConstructor()) skip= false; skip= skip || Flags.isSynthetic(flags) || Flags.isBridge(flags); if (!skip) appendMethodDeclaration(method); } fBuffer.append("\n"); } } finally { monitor.done(); } }