public class FunctionUtils extends Object
Constructor and Description |
---|
FunctionUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canBeImported(ReferenceModel model,
com.google.javascript.rhino.Node node,
String typeName,
String packageName)
Check we can import the given type into the given package.
|
static boolean |
containsTemplate(BaseReference reference,
String name) |
static boolean |
hasTemplate(BaseReference reference) |
static String |
toParameter(BaseReference reference,
com.google.javascript.rhino.JSDocInfo comment,
String paramName,
com.google.javascript.rhino.JSTypeExpression parameterType,
boolean outputJS) |
static String |
toParameterString(BaseReference reference,
com.google.javascript.rhino.JSDocInfo comment,
com.google.javascript.rhino.Node paramNode,
boolean outputJS) |
static String |
toParameterType(BaseReference reference,
String name)
Compute the type of a function or method parameter.
|
static String |
toReturnString(BaseReference reference) |
public static String toParameterType(BaseReference reference, String name)
reference
- The FunctionReference or MethodReference the parameter belongs toname
- The name of the parameterpublic static String toReturnString(BaseReference reference)
public static String toParameterString(BaseReference reference, com.google.javascript.rhino.JSDocInfo comment, com.google.javascript.rhino.Node paramNode, boolean outputJS)
public static boolean canBeImported(ReferenceModel model, com.google.javascript.rhino.Node node, String typeName, String packageName)
model
- The containing reference modelnode
- The containing nodetypeName
- The type we want checkpackageName
- The current packagepublic static String toParameter(BaseReference reference, com.google.javascript.rhino.JSDocInfo comment, String paramName, com.google.javascript.rhino.JSTypeExpression parameterType, boolean outputJS)
public static boolean hasTemplate(BaseReference reference)
public static boolean containsTemplate(BaseReference reference, String name)
Copyright © 2016 The Apache Software Foundation. All rights reserved.