code: private void rewritePolymer2ClassDefinition(Node node, NodeTraversal traversal) {
      PolymerClassDefinition def =
          PolymerClassDefinition.extractFromClassNode(node, compiler, globalNames);
      if (def != null) {
        PolymerClassRewriter rewriter =
            new PolymerClassRewriter(
                compiler,
                getExtensInsertionRef(),
                polymerVersion,
                polymerExportPolicy,
                this.propertyRenamingEnabled);
        rewriter.propertySinkExternInjected = propertySinkExternInjected;
        rewriter.rewritePolymerClassDeclaration(node, traversal, def);
        propertySinkExternInjected = rewriter.propertySinkExternInjected;
      }
    }
docs: Polymer 2.x Class Nodes