com.caucho.quercus.parser
Class ClassScope

java.lang.Object
  extended by com.caucho.quercus.parser.Scope
      extended by com.caucho.quercus.parser.ClassScope

public class ClassScope
extends Scope

Class parse scope.


Field Summary
 
Fields inherited from class com.caucho.quercus.parser.Scope
_parent
 
Constructor Summary
ClassScope(InterpretedClassDef cl)
           
 
Method Summary
 InterpretedClassDef addClass(Location location, java.lang.String name, java.lang.String parentName, java.util.ArrayList<java.lang.String> ifaceList, int index, boolean isTop)
          Adds a class
protected  void addConditionalClass(InterpretedClassDef def)
           
 void addConditionalFunction(java.lang.String name, Function function)
           
 void addConstant(java.lang.String name, Expr value)
          Adds a constant value
 void addFunction(java.lang.String name, Function function, boolean isTop)
          Adds a function.
 void addStaticVar(StringValue name, Expr value, java.lang.String comment)
          Adds a static value
 void addVar(StringValue name, Expr value, FieldVisibility visibility, java.lang.String comment)
          Adds a value
 boolean isAbstract()
          Returns true for an abstract scope, e.g.
 boolean isClass()
          Returns true if scope is within a class.
 
Methods inherited from class com.caucho.quercus.parser.Scope
addConditionalFunction, getParent, isFunction, isGlobal, isIf, isSwitchCase, isTry, isWhile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassScope

public ClassScope(InterpretedClassDef cl)
Method Detail

isClass

public boolean isClass()
Returns true if scope is within a class.

Overrides:
isClass in class Scope

isAbstract

public boolean isAbstract()
Returns true for an abstract scope, e.g. an abstract class or an interface.

Overrides:
isAbstract in class Scope

addFunction

public void addFunction(java.lang.String name,
                        Function function,
                        boolean isTop)
Adds a function.

Specified by:
addFunction in class Scope

addConditionalFunction

public void addConditionalFunction(java.lang.String name,
                                   Function function)
Overrides:
addConditionalFunction in class Scope

addVar

public void addVar(StringValue name,
                   Expr value,
                   FieldVisibility visibility,
                   java.lang.String comment)
Adds a value


addStaticVar

public void addStaticVar(StringValue name,
                         Expr value,
                         java.lang.String comment)
Adds a static value


addConstant

public void addConstant(java.lang.String name,
                        Expr value)
Adds a constant value

Overrides:
addConstant in class Scope

addClass

public InterpretedClassDef addClass(Location location,
                                    java.lang.String name,
                                    java.lang.String parentName,
                                    java.util.ArrayList<java.lang.String> ifaceList,
                                    int index,
                                    boolean isTop)
Adds a class

Specified by:
addClass in class Scope

addConditionalClass

protected void addConditionalClass(InterpretedClassDef def)
Specified by:
addConditionalClass in class Scope