Package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify

Examples of com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.SymTabAST


            final DetailAST nameAST = (DetailAST) it.next();
            // find methods using the field
            final Iterator refIt = getReferences(nameAST);
            while (refIt.hasNext()) {
                final Reference ref = (Reference) refIt.next();
                final SymTabAST refNode = ref.getTreeNode();
                final DetailAST refDetail = refNode.getDetailNode();
                // don't need to check a self-reference
                if (refDetail == nameAST) {
                    continue;
                }
                DetailAST parent = refDetail.getParent();
View Full Code Here


     * @param aAST the AST for the references.
     * @return an iterator for the references to aAST.
     */
    private Iterator getReferences(DetailAST aAST)
    {
        final SymTabAST ident = getASTManager().get(aAST);
        final Definition definition =
            (Definition) ident.getDefinition();
        if (definition != null) {
            return definition.getReferences();
        }
        final Set dummy = new HashSet();
        return dummy.iterator();
View Full Code Here

     * @param aAST the DetailAST to count.
     * @return the number of references to aAST.
     */
    private int getReferenceCount(DetailAST aAST)
    {
        final SymTabAST ident = getASTManager().get(aAST);
        if (ident == null) {
            return 0;
        }
        final Definition definition =
            (Definition) ident.getDefinition();
        if (definition != null) {
            return definition.getNumReferences();
        }

        return 0;
View Full Code Here

TOP

Related Classes of com.puppycrawl.tools.checkstyle.checks.usage.transmogrify.SymTabAST

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.