org.jruby.compiler
Class ASTInspector

java.lang.Object
  extended by org.jruby.compiler.ASTInspector

public class ASTInspector
extends java.lang.Object

Author:
headius

Field Summary
static boolean ENABLED
           
static java.util.Set<java.lang.String> FRAME_AWARE_METHODS
           
static java.util.Set<java.lang.String> PRAGMAS
           
 
Constructor Summary
ASTInspector()
           
 
Method Summary
 void disable()
           
 boolean hasBlockArg()
           
 boolean hasClass()
           
 boolean hasClosure()
           
 boolean hasDef()
           
 boolean hasFrameAwareMethods()
           
 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()
           
static 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRAME_AWARE_METHODS

public static java.util.Set<java.lang.String> FRAME_AWARE_METHODS

PRAGMAS

public static java.util.Set<java.lang.String> PRAGMAS

ENABLED

public static final boolean ENABLED
Constructor Detail

ASTInspector

public ASTInspector()
Method Detail

disable

public void disable()

subInspect

public static 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

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()

hasDef

public boolean hasDef()

hasFrameAwareMethods

public boolean hasFrameAwareMethods()

hasScopeAwareMethods

public boolean hasScopeAwareMethods()

hasBlockArg

public boolean hasBlockArg()

hasOptArgs

public boolean hasOptArgs()

hasRestArg

public boolean hasRestArg()

noFrame

public boolean noFrame()


Copyright © 2002-2007 JRuby Team. All Rights Reserved.