Class DefCollectorVisitor

java.lang.Object
com.google.gwt.resources.css.ast.CssVisitor
com.google.gwt.resources.converter.DefCollectorVisitor

public class DefCollectorVisitor extends com.google.gwt.resources.css.ast.CssVisitor
GSS requires that constants are defined in upper case. This visitor will collect all existing constants, create the GSS compatible name of each constant and returns a mapping of all original names with the new generated name.

This visitor lists also all constant nodes.

  • Field Summary

    Fields inherited from class com.google.gwt.resources.css.ast.CssVisitor

    UNMODIFIABLE_CONTEXT
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefCollectorVisitor(boolean lenient, TreeLogger treeLogger)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.google.gwt.resources.css.ast.CssDef>
     
     
    boolean
    visit(com.google.gwt.resources.css.ast.CssDef x, com.google.gwt.resources.css.ast.Context ctx)
     
    boolean
    visit(com.google.gwt.resources.css.ast.CssEval x, com.google.gwt.resources.css.ast.Context ctx)
     
    boolean
    visit(com.google.gwt.resources.css.ast.CssUrl x, com.google.gwt.resources.css.ast.Context ctx)
     

    Methods inherited from class com.google.gwt.resources.css.ast.CssVisitor

    accept, accept, acceptWithInsertRemove, doAccept, doAccept, doAcceptWithInsertRemove, doTraverse, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefCollectorVisitor

      public DefCollectorVisitor(boolean lenient, TreeLogger treeLogger)
  • Method Details

    • getDefMapping

      public Map<String,String> getDefMapping()
    • getConstantNodes

      public List<com.google.gwt.resources.css.ast.CssDef> getConstantNodes()
    • visit

      public boolean visit(com.google.gwt.resources.css.ast.CssEval x, com.google.gwt.resources.css.ast.Context ctx)
      Overrides:
      visit in class com.google.gwt.resources.css.ast.CssVisitor
      Parameters:
      x - the node being visited
      ctx - the context for the visit
    • visit

      public boolean visit(com.google.gwt.resources.css.ast.CssDef x, com.google.gwt.resources.css.ast.Context ctx)
      Overrides:
      visit in class com.google.gwt.resources.css.ast.CssVisitor
      Parameters:
      x - the node being visited
      ctx - the context for the visit
    • visit

      public boolean visit(com.google.gwt.resources.css.ast.CssUrl x, com.google.gwt.resources.css.ast.Context ctx)
      Overrides:
      visit in class com.google.gwt.resources.css.ast.CssVisitor
      Parameters:
      x - the node being visited
      ctx - the context for the visit