public class ASTInspector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BACKREF |
static int |
BLOCK_ARG |
static int |
CLASS |
static int |
CLASS_VAR |
static int |
CLOSURE |
static int |
CONSTANT |
static int |
EVAL |
static int |
FRAME_AWARE |
static java.util.Set<java.lang.String> |
FRAME_AWARE_METHODS |
static int |
FRAME_BLOCK |
static int |
FRAME_CLASS |
static int |
FRAME_NAME |
static int |
FRAME_SELF |
static int |
FRAME_VISIBILITY |
static int |
LASTLINE |
static int |
METHOD |
static int |
OPT_ARGS |
static java.util.Set<java.lang.String> |
PRAGMAS |
static int |
REST_ARG |
static int |
RETRY |
static int |
SCOPE_AWARE |
static java.util.Set<java.lang.String> |
SCOPE_AWARE_METHODS |
static int |
SUPER |
static int |
ZSUPER |
Constructor and Description |
---|
ASTInspector() |
ASTInspector(java.lang.String name,
boolean dump) |
Modifier and Type | Method and Description |
---|---|
static void |
addFrameAwareMethods(java.lang.String... methods) |
static void |
addScopeAwareMethods(java.lang.String... methods) |
void |
disable() |
CallConfiguration |
getCallConfig() |
boolean |
getFlag(int modifier) |
boolean |
hasBlockArg() |
boolean |
hasClass() |
boolean |
hasClassVar() |
boolean |
hasClosure() |
boolean |
hasConstant() |
boolean |
hasFrameAwareMethods() |
boolean |
hasMethod()
Whether the tree under inspection contains any method-table mutations,
including def, defs, undef, and alias.
|
boolean |
hasOptArgs() |
boolean |
hasRestArg() |
boolean |
hasScopeAwareMethods() |
void |
inspect(Node node) |
void |
integrate(ASTInspector other)
Integrate the results of a separate inspection into the state of this
inspector.
|
boolean |
noFrame() |
void |
setFlag(int modifier) |
void |
setFlag(Node node,
int modifier) |
ASTInspector |
subInspect(Node... nodes)
Perform an inspection of a subtree or set of subtrees separate from the
parent inspection, to make independent decisions based on that subtree(s).
|
public static final int BLOCK_ARG
public static final int CLOSURE
public static final int CLASS
public static final int METHOD
public static final int EVAL
public static final int FRAME_AWARE
public static final int FRAME_SELF
public static final int FRAME_VISIBILITY
public static final int FRAME_BLOCK
public static final int FRAME_NAME
public static final int BACKREF
public static final int LASTLINE
public static final int FRAME_CLASS
public static final int OPT_ARGS
public static final int REST_ARG
public static final int SCOPE_AWARE
public static final int ZSUPER
public static final int CONSTANT
public static final int CLASS_VAR
public static final int SUPER
public static final int RETRY
public static final java.util.Set<java.lang.String> FRAME_AWARE_METHODS
public static final java.util.Set<java.lang.String> SCOPE_AWARE_METHODS
public static final java.util.Set<java.lang.String> PRAGMAS
public ASTInspector()
public ASTInspector(java.lang.String name, boolean dump)
public static void addFrameAwareMethods(java.lang.String... methods)
public static void addScopeAwareMethods(java.lang.String... methods)
public void disable()
public CallConfiguration getCallConfig()
public ASTInspector subInspect(Node... nodes)
nodes
- The child nodes to walk with a new inspectorpublic boolean getFlag(int modifier)
public void setFlag(int modifier)
public void setFlag(Node node, int modifier)
public void integrate(ASTInspector other)
other
- The other inspector whose state to integrate.public void inspect(Node node)
public boolean hasClass()
public boolean hasClosure()
public boolean hasMethod()
public boolean hasFrameAwareMethods()
public boolean hasScopeAwareMethods()
public boolean hasBlockArg()
public boolean hasOptArgs()
public boolean hasRestArg()
public boolean hasConstant()
public boolean hasClassVar()
public boolean noFrame()
Copyright © 2002-2009 JRuby Team. All Rights Reserved.