Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1789)

Unified Diff: Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionRecord.java

Issue 137553005: DevTools: [JsDocValidator] Refactor JsDoc annotation checkers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Limit the thread count by the number of validated files Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionRecord.java
diff --git a/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionRecord.java b/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionRecord.java
new file mode 100644
index 0000000000000000000000000000000000000000..d5621fee5dc9a644068186fa724eb563623ac559
--- /dev/null
+++ b/Source/devtools/scripts/jsdoc-validator/src/org/chromium/devtools/jsdoc/checks/FunctionRecord.java
@@ -0,0 +1,28 @@
+package org.chromium.devtools.jsdoc.checks;
+
+import com.google.javascript.rhino.head.ast.FunctionNode;
+
+public class FunctionRecord {
+ public final FunctionNode functionNode;
+ public final boolean isConstructor;
+ public final String returnType;
eustas 2014/01/28 08:47:21 private?
apavlov 2014/01/28 10:40:17 package-private for other potential clients
+ public final TypeRecord enclosingType;
+ public final FunctionRecord enclosingFunctionRecord;
+
+ public FunctionRecord(FunctionNode functionNode, boolean isConstructor,
+ String returnType, TypeRecord parentType, FunctionRecord enclosingFunctionRecord) {
+ this.functionNode = functionNode;
+ this.isConstructor = isConstructor;
+ this.returnType = returnType;
+ this.enclosingType = parentType;
+ this.enclosingFunctionRecord = enclosingFunctionRecord;
+ }
+
+ public boolean isTopLevelFunction() {
+ return enclosingFunctionRecord == null;
+ }
+
+ public boolean hasReturnAnnotation() {
+ return returnType != null;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698