org.jruby.parser
Class LocalStaticScope

java.lang.Object
  extended byorg.jruby.parser.StaticScope
      extended byorg.jruby.parser.LocalStaticScope
All Implemented Interfaces:
java.io.Serializable

public class LocalStaticScope
extends StaticScope

See Also:
Serialized Form

Constructor Summary
LocalStaticScope(StaticScope enclosingScope)
           
LocalStaticScope(StaticScope enclosingScope, java.lang.String[] names)
           
 
Method Summary
 AssignableNode assign(ISourcePosition position, java.lang.String name, Node value, StaticScope topScope, int depth)
           
 Node declare(ISourcePosition position, java.lang.String name, int depth)
           
 java.lang.String[] getAllNamesInScope(DynamicScope dynamicScope)
          Get all visible variables that we can see from this scope that have been assigned (e.g.
 StaticScope getLocalScope()
          Gets the Local Scope relative to the current Scope.
 int isDefined(java.lang.String name, int depth)
           
 
Methods inherited from class org.jruby.parser.StaticScope
addVariable, assign, declare, exists, getEnclosingScope, getNumberOfVariables, getVariables, isDefined, setVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalStaticScope

public LocalStaticScope(StaticScope enclosingScope)

LocalStaticScope

public LocalStaticScope(StaticScope enclosingScope,
                        java.lang.String[] names)
Method Detail

getLocalScope

public StaticScope getLocalScope()
Description copied from class: StaticScope
Gets the Local Scope relative to the current Scope. For LocalScopes this will be itself. Blocks will contain the LocalScope it contains.

Specified by:
getLocalScope in class StaticScope
Returns:
localScope

isDefined

public int isDefined(java.lang.String name,
                     int depth)
Specified by:
isDefined in class StaticScope

getAllNamesInScope

public java.lang.String[] getAllNamesInScope(DynamicScope dynamicScope)
Description copied from class: StaticScope
Get all visible variables that we can see from this scope that have been assigned (e.g. seen so far)

Specified by:
getAllNamesInScope in class StaticScope
Returns:
a list of all names (sans $~ and $_ which are special names)
See Also:
org.jruby.parser.StaticScope#getAllNamesInScope()

assign

public AssignableNode assign(ISourcePosition position,
                             java.lang.String name,
                             Node value,
                             StaticScope topScope,
                             int depth)
Specified by:
assign in class StaticScope

declare

public Node declare(ISourcePosition position,
                    java.lang.String name,
                    int depth)
Specified by:
declare in class StaticScope


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