Package com.sun.source.util

Examples of com.sun.source.util.TreePath


            Element pkg = e.getEnclosingElement();
            if(pkg.getKind()!=ElementKind.PACKAGE)
                continue;
            ClassTree ct = pss.getTrees().getTree(e);
            if(ct==null)    continue;
            TreePath treePath = pss.getTreePathByClass().get(ct);

            if (treePath == null || treePath.getCompilationUnit() == null) {
                continue;
            }

            String primaryName = TreeUtil.getPrimaryTypeName(treePath.getCompilationUnit());
            if(ct.getSimpleName().toString().equals(primaryName))
                continue; // a primary type

            String prefix = ((PackageElement)pkg).getQualifiedName().toString().replace('.','/')+'/';
            if (prefix.equals("/")) { // default package
View Full Code Here

TOP

Related Classes of com.sun.source.util.TreePath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.