javax.lang.model.util.ElementScanner6 Java Examples

The following examples show how to use javax.lang.model.util.ElementScanner6. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InstantRenamePerformer.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static boolean isOverriddenInsideOutermostEnclosingClass(final ExecutableElement ee, final ElementUtilities eu) {
    final boolean[] ret = new boolean[] {false};
    new ElementScanner6<Void, Void>() {
        @Override
        public Void visitType(TypeElement te, Void p) {
            if (ret[0])
                return null;
            if (te != ee.getEnclosingElement() && eu.getImplementationOf(ee, te) != null && !isAnyEncloserPrivate(te))
                ret[0] = true;
            return super.visitType(te, p);
        }            
    }.scan(eu.outermostTypeElement(ee));
    return ret[0];
}