Chromium Code Reviews| Index: Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/TypeRecord.java |
| diff --git a/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/TypeRecord.java b/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/TypeRecord.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..523cc324f7379812145fc9a40dcaad0a522c8692 |
| --- /dev/null |
| +++ b/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/TypeRecord.java |
| @@ -0,0 +1,42 @@ |
| +package org.chromium.devtools.jsdoc.checks; |
| + |
| +import com.google.javascript.rhino.head.ast.AstNode; |
| +import com.google.javascript.rhino.head.ast.Comment; |
| + |
| +import java.util.List; |
| + |
| +public class TypeRecord { |
| + public final String typeName; |
| + public final boolean isInterface; |
| + public final List<InheritanceEntry> extendedTypes; |
| + public final List<InheritanceEntry> implementedTypes; |
|
eustas
2014/01/28 08:47:21
private? unused?
apavlov
2014/01/28 10:40:17
Done.
|
| + public AstNode prototypeNode; |
|
eustas
2014/01/28 08:47:21
ditto
apavlov
2014/01/28 10:40:17
Done.
|
| + |
| + public TypeRecord(String typeName, boolean isInterface, |
| + List<InheritanceEntry> extendedTypes, List<InheritanceEntry> implementedTypes) { |
| + this.typeName = typeName; |
| + this.isInterface = isInterface; |
| + this.extendedTypes = extendedTypes; |
| + this.implementedTypes = implementedTypes; |
| + } |
| + |
| + void setPrototypeNode(AstNode node) { |
| + this.prototypeNode = node; |
| + } |
| + |
| + public InheritanceEntry getFirstExtendedType() { |
| + return this.extendedTypes.isEmpty() ? null : this.extendedTypes.get(0); |
| + } |
| + |
| + public static class InheritanceEntry { |
| + public final String superTypeName; |
| + public final Comment jsDocNode; |
| + public final int offsetInJsDocText; |
| + |
| + public InheritanceEntry(String superTypeName, Comment jsDocNode, int offsetInJsDocText) { |
| + this.superTypeName = superTypeName; |
| + this.offsetInJsDocText = offsetInJsDocText; |
| + this.jsDocNode = jsDocNode; |
| + } |
| + } |
| +} |