/
JsDocComment.java
41 lines (31 loc) · 996 Bytes
/
JsDocComment.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.google.dart.compiler.backend.js.ast;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
import java.util.Map;
public class JsDocComment extends JsExpression {
private final Map<String, Object> tags;
public JsDocComment(Map<String, Object> tags) {
this.tags = tags;
}
public Map<String, Object> getTags() {
return tags;
}
public JsDocComment(String tagName, JsNameRef tagValue) {
tags = Collections.<String, Object>singletonMap(tagName, tagValue);
}
public JsDocComment(String tagName, String tagValue) {
tags = Collections.<String, Object>singletonMap(tagName, tagValue);
}
@Override
public void accept(JsVisitor v) {
v.visitDocComment(this);
}
@Override
public void traverse(JsVisitorWithContext v, JsContext ctx) {
}
@NotNull
@Override
public JsDocComment deepCopy() {
return new JsDocComment(tags).withMetadataFrom(this);
}
}