Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / scripts / jsdoc-validator / src / org / chromium / devtools / jsdoc / checks / TypeRecord.java
1 package org.chromium.devtools.jsdoc.checks;
2
3 import com.google.javascript.rhino.head.ast.Comment;
4
5 import java.util.List;
6
7 public class TypeRecord {
8     public final String typeName;
9     public final boolean isInterface;
10     public final List<InheritanceEntry> extendedTypes;
11
12     public TypeRecord(String typeName, boolean isInterface,
13             List<InheritanceEntry> extendedTypes) {
14         this.typeName = typeName;
15         this.isInterface = isInterface;
16         this.extendedTypes = extendedTypes;
17     }
18
19     public InheritanceEntry getFirstExtendedType() {
20         return this.extendedTypes.isEmpty() ? null : this.extendedTypes.get(0);
21     }
22
23     public static class InheritanceEntry {
24         public final String superTypeName;
25         public final Comment jsDocNode;
26         public final int offsetInJsDocText;
27
28         public InheritanceEntry(String superTypeName, Comment jsDocNode, int offsetInJsDocText) {
29             this.superTypeName = superTypeName;
30             this.offsetInJsDocText = offsetInJsDocText;
31             this.jsDocNode = jsDocNode;
32         }
33     }
34 }