com.google.gwt.resources.gss

## Class ClassNamesCollector

- java.lang.Object
- - com.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitor
  - - com.google.gwt.resources.gss.ClassNamesCollector

- All Implemented Interfaces:
    com.google.gwt.thirdparty.common.css.compiler.ast.AtRuleHandler, com.google.gwt.thirdparty.common.css.compiler.ast.CssTreeVisitor

      public class ClassNamesCollector
      extends com.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitor

  Collect all CSS class names in a stylesheet.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassNamesCollector()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `enterClassSelector(com.google.gwt.thirdparty.common.css.compiler.ast.CssClassSelectorNode classSelector)`
    `java.util.Set<java.lang.String>` | `getClassNames(com.google.gwt.thirdparty.common.css.compiler.ast.CssTree tree)` Extract all CSS class names in the provided stylesheet.
    `java.util.Set<java.lang.String>` | `getClassNames(com.google.gwt.thirdparty.common.css.compiler.ast.CssTree tree, java.util.Set<JClassType> imports)` Extract all CSS class names in the provided stylesheet, modulo those imported from another context.

    - ### Methods inherited from class com.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitor

      `enterArgumentNode, enterAttributeSelector, enterBlock, enterCombinator, enterComponent, enterCompositeValueNode, enterCompositeValueNodeOperator, enterConditionalBlock, enterConditionalRule, enterDeclaration, enterDeclarationBlock, enterDefinition, enterFontFace, enterForLoop, enterFunctionNode, enterIdSelector, enterImportBlock, enterImportRule, enterKey, enterKeyBlock, enterKeyframeRuleset, enterKeyframesRule, enterMediaRule, enterMediaTypeListDelimiter, enterMixin, enterMixinDefinition, enterPageRule, enterPageSelector, enterPropertyValue, enterProvideNode, enterPseudoClass, enterPseudoElement, enterRequireNode, enterRuleset, enterSelector, enterSelectorBlock, enterTree, enterUnknownAtRule, enterValueNode, leaveArgumentNode, leaveAttributeSelector, leaveBlock, leaveClassSelector, leaveCombinator, leaveComponent, leaveCompositeValueNode, leaveCompositeValueNodeOperator, leaveConditionalBlock, leaveConditionalRule, leaveDeclaration, leaveDeclarationBlock, leaveDefinition, leaveFontFace, leaveForLoop, leaveFunctionNode, leaveIdSelector, leaveImportBlock, leaveImportRule, leaveKey, leaveKeyBlock, leaveKeyframeRuleset, leaveKeyframesRule, leaveMediaRule, leaveMediaTypeListDelimiter, leaveMixin, leaveMixinDefinition, leavePageRule, leavePageSelector, leavePropertyValue, leaveProvideNode, leavePseudoClass, leavePseudoElement, leaveRequireNode, leaveRuleset, leaveSelector, leaveSelectorBlock, leaveTree, leaveUnknownAtRule, leaveValueNode, visit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClassNamesCollector

          public ClassNamesCollector()

  - ### Method Detail

    - #### getClassNames

          public java.util.Set<java.lang.String> getClassNames(com.google.gwt.thirdparty.common.css.compiler.ast.CssTree tree)

      Extract all CSS class names in the provided stylesheet.

    - #### getClassNames

          public java.util.Set<java.lang.String> getClassNames(com.google.gwt.thirdparty.common.css.compiler.ast.CssTree tree,
                                                               java.util.Set<JClassType> imports)

      Extract all CSS class names in the provided stylesheet, modulo those imported from another context.

    - #### enterClassSelector

          public boolean enterClassSelector(com.google.gwt.thirdparty.common.css.compiler.ast.CssClassSelectorNode classSelector)

      Specified by:
        `enterClassSelector` in interface `com.google.gwt.thirdparty.common.css.compiler.ast.CssTreeVisitor`
      Overrides:
        `enterClassSelector` in class `com.google.gwt.thirdparty.common.css.compiler.ast.DefaultTreeVisitor`