@Test public void testMethodBinding() { final JavascriptApproximateVariableBindingExtractor jabe = new JavascriptApproximateVariableBindingExtractor(); final List<TokenNameBinding> methodVariableBindings = jabe .getNameBindings(methodContent); BindingTester.checkAllBindings(methodVariableBindings); assertEquals(methodVariableBindings.size(), 1); }
@Override public Set<Set<ASTNode>> getNameBindings(final ASTNode node) { final VariableBindingFinder bindingFinder = new VariableBindingFinder(); node.accept(bindingFinder); final Set<Set<ASTNode>> nameBindings = Sets.newHashSet(); for (final Entry<Integer, List<ASTNode>> variableBindings : bindingFinder.variableBinding .entrySet()) { final Set<ASTNode> boundNodes = Sets.newIdentityHashSet(); boundNodes.addAll(variableBindings.getValue()); nameBindings.add(boundNodes); } return nameBindings; }
JavascriptApproximateVariableBindingExtractor extends
		AbstractJavascriptNameBindingsExtractor { @Override public Set<Set<ASTNode>> getNameBindings(final ASTNode node) { final VariableBindingFinder bindingFinder = new VariableBindingFinder(); node.accept(bindingFinder); final Set<Set<ASTNode>> nameBindings = Sets.newHashSet(); for (final Entry<Integer, List<ASTNode>> variableBindings : bindingFinder.variableBinding .entrySet()) { final Set<ASTNode> boundNodes = Sets.newIdentityHashSet(); boundNodes.addAll(variableBindings.getValue()); nameBindings.add(boundNodes); } return nameBindings; } }
JavascriptApproximateVariableBindingExtractor extends
		AbstractJavascriptNameBindingsExtractor { @Override public Set<Set<ASTNode>> getNameBindings(final ASTNode node) { final VariableBindingFinder bindingFinder = new VariableBindingFinder(); node.accept(bindingFinder); final Set<Set<ASTNode>> nameBindings = Sets.newHashSet(); for (final Entry<Integer, List<ASTNode>> variableBindings : bindingFinder.variableBinding .entrySet()) { final Set<ASTNode> boundNodes = Sets.newIdentityHashSet(); boundNodes.addAll(variableBindings.getValue()); nameBindings.add(boundNodes); } return nameBindings; }  }
JavascriptApproximateVariableBindingExtractor extends
		AbstractJavascriptNameBindingsExtractor { @Override public Set<Set<ASTNode>> getNameBindings(final ASTNode node) { final VariableBindingFinder bindingFinder = new VariableBindingFinder(); node.accept(bindingFinder); final Set<Set<ASTNode>> nameBindings = Sets.newHashSet(); for (final Entry<Integer, List<ASTNode>> variableBindings : bindingFinder.variableBinding .entrySet()) { final Set<ASTNode> boundNodes = Sets.newIdentityHashSet(); boundNodes.addAll(variableBindings.getValue()); nameBindings.add(boundNodes); } return nameBindings; }  @Override Set<?> getAvailableFeatures(); @Override Set<Set<ASTNode>> getNameBindings(final ASTNode node); @Override void setActiveFeatures(final Set<?> activeFeatures); }
JavascriptApproximateVariableBindingExtractor extends
		AbstractJavascriptNameBindingsExtractor { @Override public Set<Set<ASTNode>> getNameBindings(final ASTNode node) { final VariableBindingFinder bindingFinder = new VariableBindingFinder(); node.accept(bindingFinder); final Set<Set<ASTNode>> nameBindings = Sets.newHashSet(); for (final Entry<Integer, List<ASTNode>> variableBindings : bindingFinder.variableBinding .entrySet()) { final Set<ASTNode> boundNodes = Sets.newIdentityHashSet(); boundNodes.addAll(variableBindings.getValue()); nameBindings.add(boundNodes); } return nameBindings; }  @Override Set<?> getAvailableFeatures(); @Override Set<Set<ASTNode>> getNameBindings(final ASTNode node); @Override void setActiveFeatures(final Set<?> activeFeatures);  }