@Override public boolean accept(Element e, TypeMirror t) { switch (e.getKind()) { case METHOD: String sn = e.getSimpleName().toString(); return startsWith(env, sn, prefix) && (Utilities.isShowDeprecatedMembers() || !elements.isDeprecated(e)) && env.isAccessible(scope, e, t, isSuperCall) && (!Utilities.isExcludeMethods() || !Utilities.isExcluded(eu.getElementName(e.getEnclosingElement(), true) + "." + sn)); //NOI18N } return false; } };
&& (!isStatic || e.getModifiers().contains(STATIC)) && trees.isAccessible(scope, e, (DeclaredType) t) && (!Utilities.isExcludeMethods() || !Utilities.isExcluded(eu.getElementName(e.getEnclosingElement(), true) + "." + sn)); //NOI18N
&& isOfKindAndType(((ExecutableType) asMemberOf(e, t, types)).getReturnType(), e, kinds, baseType, scope, trees, types) && env.isAccessible(scope, e, t, isSuperCall) && (!Utilities.isExcludeMethods() || !Utilities.isExcluded(eu.getElementName(e.getEnclosingElement(), true) + "." + sn))) { //NOI18N hasAdditionalMembers = true; && isOfKindAndType(((ExecutableType) asMemberOf(e, t, types)).getReturnType(), e, kinds, baseType, scope, trees, types) && env.isAccessible(scope, e, t, isSuperCall) && (!Utilities.isExcludeMethods() || !Utilities.isExcluded(eu.getElementName(e.getEnclosingElement(), true) + "." + sn)); //NOI18N case CLASS: case ENUM:
private void addPackageContent(final Env env, PackageElement pe, EnumSet<ElementKind> kinds, DeclaredType baseType, boolean insideNew, boolean insidePkgStmt) throws IOException { Set<? extends TypeMirror> smartTypes = options.contains(Options.ALL_COMPLETION) ? null : getSmartTypes(env); CompilationController controller = env.getController(); Elements elements = controller.getElements(); Types types = controller.getTypes(); Trees trees = controller.getTrees(); ElementUtilities eu = controller.getElementUtilities(); Scope scope = env.getScope(); for (Element e : pe.getEnclosedElements()) { if (e.getKind().isClass() || e.getKind().isInterface()) { String name = e.getSimpleName().toString(); if ((env.getExcludes() == null || !env.getExcludes().contains(e)) && startsWith(env, name) && (Utilities.isShowDeprecatedMembers() || !elements.isDeprecated(e)) && trees.isAccessible(scope, (TypeElement) e) && isOfKindAndType(e.asType(), e, kinds, baseType, scope, trees, types) && !Utilities.isExcluded(eu.getElementName(e, true))) { results.add(itemFactory.createTypeItem(env.getController(), (TypeElement) e, (DeclaredType) e.asType(), anchorOffset, null, elements.isDeprecated(e), insideNew, insideNew || env.isInsideClass(), true, isOfSmartType(env, e.asType(), smartTypes), false)); } } } String pkgName = pe.getQualifiedName() + "."; //NOI18N addPackages(env, pkgName, insidePkgStmt); }
if (el != null && (el.getKind().isClass() || el.getKind().isInterface())) { if (parent.getKind() == Tree.Kind.NEW_CLASS && ((NewClassTree) parent).getIdentifier() == fa && prefix != null) { String typeName = controller.getElementUtilities().getElementName(el, true) + "." + prefix; //NOI18N TypeMirror tm = controller.getTreeUtilities().parseType(typeName, env.getScope().getEnclosingClass()); if (tm != null && tm.getKind() == TypeKind.DECLARED) { String typeName = controller.getElementUtilities().getElementName(el, true) + "." + prefix; //NOI18N TypeMirror tm = controller.getTreeUtilities().parseType(typeName, env.getScope().getEnclosingClass()); if (tm != null && tm.getKind() == TypeKind.DECLARED) {