code: private void rewritePolymer1ClassDefinition(Node node, Node parent, NodeTraversal traversal) {
      Node grandparent = parent.getParent();
      if (grandparent.isConst()) {
        compiler.report(JSError.make(node, POLYMER_INVALID_DECLARATION));
        return;
      }
      PolymerClassDefinition def = PolymerClassDefinition.extractFromCallNode(
          node, compiler, globalNames);
      if (def != null) {
        if (def.nativeBaseElement != null) {
          appendPolymerElementExterns(def);
        }
        PolymerClassRewriter rewriter =
            new PolymerClassRewriter(
                compiler,
                getExtensInsertionRef(),
                polymerVersion,
                polymerExportPolicy,
                this.propertyRenamingEnabled);
        if (NodeUtil.isNameDeclaration(grandparent) || parent.isAssign()) {
          rewriter.rewritePolymerCall(grandparent, def, traversal.inGlobalScope());
        } else {
          rewriter.rewritePolymerCall(parent, def, traversal.inGlobalScope());
        }
      }
    }
docs: Polymer 1.x and Polymer 2 Legacy Element Definitions