Class JavaScriptCompletionResolver.CompilerNodeVisitor

  • All Implemented Interfaces:
    org.mozilla.javascript.ast.NodeVisitor
    Enclosing class:
    JavaScriptCompletionResolver

    private class JavaScriptCompletionResolver.CompilerNodeVisitor
    extends java.lang.Object
    implements org.mozilla.javascript.ast.NodeVisitor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean ignoreParams  
      private java.util.HashSet<org.mozilla.javascript.ast.AstNode> paramNodes  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CompilerNodeVisitor​(boolean ignoreParams)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void collectAllNodes​(org.mozilla.javascript.ast.AstNode node)
      Get all nodes within AstNode and add to an ArrayList
      private java.lang.String createLookupString​(org.mozilla.javascript.ast.FunctionCall fn)  
      private boolean ignore​(org.mozilla.javascript.ast.AstNode node, boolean ignoreParams)
      Test node to check whether to ignore resolving, this is for parameters
      private boolean isParameter​(org.mozilla.javascript.ast.AstNode node)
      Check the function that a name may belong to contains this actual parameter
      private boolean validNode​(org.mozilla.javascript.ast.AstNode node)  
      boolean visit​(org.mozilla.javascript.ast.AstNode node)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ignoreParams

        private boolean ignoreParams
      • paramNodes

        private java.util.HashSet<org.mozilla.javascript.ast.AstNode> paramNodes
    • Constructor Detail

      • CompilerNodeVisitor

        private CompilerNodeVisitor​(boolean ignoreParams)
    • Method Detail

      • visit

        public boolean visit​(org.mozilla.javascript.ast.AstNode node)
        Specified by:
        visit in interface org.mozilla.javascript.ast.NodeVisitor
      • validNode

        private boolean validNode​(org.mozilla.javascript.ast.AstNode node)
      • createLookupString

        private java.lang.String createLookupString​(org.mozilla.javascript.ast.FunctionCall fn)
      • ignore

        private boolean ignore​(org.mozilla.javascript.ast.AstNode node,
                               boolean ignoreParams)
        Test node to check whether to ignore resolving, this is for parameters
        Parameters:
        node - node to test
        Returns:
        true to ignore
      • collectAllNodes

        private void collectAllNodes​(org.mozilla.javascript.ast.AstNode node)
        Get all nodes within AstNode and add to an ArrayList
        Parameters:
        node -
      • isParameter

        private boolean isParameter​(org.mozilla.javascript.ast.AstNode node)
        Check the function that a name may belong to contains this actual parameter
        Parameters:
        node - Node to check
        Returns:
        true if the function contains the parameter