001 package com.google.dart.compiler.backend.js.ast; 002 003 import org.jetbrains.annotations.NotNull; 004 005 import java.util.Collections; 006 import java.util.Map; 007 008 public class JsDocComment extends JsExpressionImpl { 009 private final Map<String, Object> tags; 010 011 public JsDocComment(Map<String, Object> tags) { 012 this.tags = tags; 013 } 014 015 public Map<String, Object> getTags() { 016 return tags; 017 } 018 019 public JsDocComment(String tagName, JsNameRef tagValue) { 020 tags = Collections.<String, Object>singletonMap(tagName, tagValue); 021 } 022 023 public JsDocComment(String tagName, String tagValue) { 024 tags = Collections.<String, Object>singletonMap(tagName, tagValue); 025 } 026 027 @Override 028 public void accept(JsVisitor v) { 029 v.visitDocComment(this); 030 } 031 032 @Override 033 public void traverse(JsVisitorWithContext v, JsContext ctx) { 034 } 035 036 @NotNull 037 @Override 038 public JsDocComment deepCopy() { 039 return new JsDocComment(tags).withMetadataFrom(this); 040 } 041 }