public class RhinoUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getFunctionArgsString(org.mozilla.javascript.ast.FunctionNode fn)
Iterates through a function's parameters and returns a string
representation of them, suitable for presentation as part of the
method's signature.
|
static java.lang.String |
getPropertyName(org.mozilla.javascript.ast.AstNode propKeyNode)
Property keys in object literals can be identifiers or string literals.
|
static java.lang.String |
getPrototypeClazz(java.util.List<org.mozilla.javascript.ast.AstNode> nodes) |
static java.lang.String |
getPrototypeClazz(java.util.List<org.mozilla.javascript.ast.AstNode> nodes,
int depth) |
static boolean |
isPrototypeNameNode(org.mozilla.javascript.ast.AstNode node) |
static boolean |
isPrototypePropertyGet(org.mozilla.javascript.ast.PropertyGet pg) |
static boolean |
isSimplePropertyGet(org.mozilla.javascript.ast.PropertyGet pg,
java.lang.String expectedObj,
java.lang.String expectedField)
Returns whether a
PropertyGet is a simple one, referencing
an object's value 1 level deep. |
static java.util.List<org.mozilla.javascript.ast.AstNode> |
toList(org.mozilla.javascript.ast.AstNode... nodes) |
public static final java.lang.String getFunctionArgsString(org.mozilla.javascript.ast.FunctionNode fn)
fn - The function node.public static final java.lang.String getPropertyName(org.mozilla.javascript.ast.AstNode propKeyNode)
ObjectProperty and returns its value, no matter what the
concrete AST node's type.propKeyNode - The AST node for the property key.public static final java.lang.String getPrototypeClazz(java.util.List<org.mozilla.javascript.ast.AstNode> nodes)
public static final java.lang.String getPrototypeClazz(java.util.List<org.mozilla.javascript.ast.AstNode> nodes,
int depth)
public static final boolean isPrototypeNameNode(org.mozilla.javascript.ast.AstNode node)
public static final boolean isPrototypePropertyGet(org.mozilla.javascript.ast.PropertyGet pg)
public static final boolean isSimplePropertyGet(org.mozilla.javascript.ast.PropertyGet pg,
java.lang.String expectedObj,
java.lang.String expectedField)
PropertyGet is a simple one, referencing
an object's value 1 level deep. For example, Object.create.pg - The PropertyGet.expectedObj - The expected object value.expectedField - The expected string value.public static final java.util.List<org.mozilla.javascript.ast.AstNode> toList(org.mozilla.javascript.ast.AstNode... nodes)