org.jruby.compiler
Class ASTInspector
java.lang.Object
org.jruby.compiler.ASTInspector
public class ASTInspector
- extends java.lang.Object
- Author:
- headius
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BLOCK_ARG
public static final int BLOCK_ARG
- See Also:
- Constant Field Values
CLOSURE
public static final int CLOSURE
- See Also:
- Constant Field Values
CLASS
public static final int CLASS
- See Also:
- Constant Field Values
METHOD
public static final int METHOD
- See Also:
- Constant Field Values
EVAL
public static final int EVAL
- See Also:
- Constant Field Values
FRAME_AWARE
public static final int FRAME_AWARE
- See Also:
- Constant Field Values
FRAME_SELF
public static final int FRAME_SELF
- See Also:
- Constant Field Values
FRAME_VISIBILITY
public static final int FRAME_VISIBILITY
- See Also:
- Constant Field Values
FRAME_BLOCK
public static final int FRAME_BLOCK
- See Also:
- Constant Field Values
FRAME_NAME
public static final int FRAME_NAME
- See Also:
- Constant Field Values
BACKREF
public static final int BACKREF
- See Also:
- Constant Field Values
LASTLINE
public static final int LASTLINE
- See Also:
- Constant Field Values
FRAME_CLASS
public static final int FRAME_CLASS
- See Also:
- Constant Field Values
OPT_ARGS
public static final int OPT_ARGS
- See Also:
- Constant Field Values
REST_ARG
public static final int REST_ARG
- See Also:
- Constant Field Values
SCOPE_AWARE
public static final int SCOPE_AWARE
- See Also:
- Constant Field Values
ZSUPER
public static final int ZSUPER
- See Also:
- Constant Field Values
CONSTANT
public static final int CONSTANT
- See Also:
- Constant Field Values
CLASS_VAR
public static final int CLASS_VAR
- See Also:
- Constant Field Values
SUPER
public static final int SUPER
- See Also:
- Constant Field Values
RETRY
public static final int RETRY
- See Also:
- Constant Field Values
FRAME_AWARE_METHODS
public static final java.util.Set<java.lang.String> FRAME_AWARE_METHODS
SCOPE_AWARE_METHODS
public static final java.util.Set<java.lang.String> SCOPE_AWARE_METHODS
PRAGMAS
public static final java.util.Set<java.lang.String> PRAGMAS
ENABLED
public static final boolean ENABLED
ASTInspector
public ASTInspector()
ASTInspector
public ASTInspector(java.lang.String name,
boolean dump)
addFrameAwareMethods
public static void addFrameAwareMethods(java.lang.String... methods)
addScopeAwareMethods
public static void addScopeAwareMethods(java.lang.String... methods)
disable
public void disable()
getCallConfig
public CallConfiguration getCallConfig()
subInspect
public 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).
- Parameters:
nodes
- The child nodes to walk with a new inspector
- Returns:
- The new inspector resulting from the walk
getFlag
public boolean getFlag(int modifier)
setFlag
public void setFlag(int modifier)
setFlag
public void setFlag(Node node,
int modifier)
integrate
public void integrate(ASTInspector other)
- Integrate the results of a separate inspection into the state of this
inspector.
- Parameters:
other
- The other inspector whose state to integrate.
inspect
public void inspect(Node node)
hasClass
public boolean hasClass()
hasClosure
public boolean hasClosure()
hasMethod
public boolean hasMethod()
- Whether the tree under inspection contains any method-table mutations,
including def, defs, undef, and alias.
- Returns:
- True if there are mutations, false otherwise
hasFrameAwareMethods
public boolean hasFrameAwareMethods()
hasScopeAwareMethods
public boolean hasScopeAwareMethods()
hasBlockArg
public boolean hasBlockArg()
hasOptArgs
public boolean hasOptArgs()
hasRestArg
public boolean hasRestArg()
hasConstant
public boolean hasConstant()
hasClassVar
public boolean hasClassVar()
noFrame
public boolean noFrame()
Copyright © 2002-2009 JRuby Team. All Rights Reserved.