com.caucho.quercus.env
Class CompiledClassDef

java.lang.Object
  extended by com.caucho.quercus.program.ClassDef
      extended by com.caucho.quercus.env.CompiledClassDef
Direct Known Subclasses:
CompiledAbstractClassDef, CompiledInterfaceDef, LazyClassDef

public class CompiledClassDef
extends ClassDef

Represents a PHP class value.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.caucho.quercus.program.ClassDef
ClassDef.FieldEntry, ClassDef.StaticFieldEntry
 
Field Summary
protected  ArrayValue _extFields
           
protected  boolean _isFinal
           
protected  Value _parent
           
 
Constructor Summary
CompiledClassDef(Location location, java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList)
           
CompiledClassDef(Location location, java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList, boolean isFinal)
           
CompiledClassDef(java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList)
           
 
Method Summary
protected  void addFieldIndex(java.lang.String name, int id)
          Returns the field index.
 Value callNew(Env env, Expr[] args)
          Eval new
 Value callNew(Env env, Value[] args)
          Eval new
 AbstractFunction findConstructor()
          Returns the constructor
 int findFieldIndex(java.lang.String name)
          Returns the field index.
 Value get(Value name)
          Adds a value.
 Value getArg(Value name)
          Returns the field value, if unset, creates an ArgGetValue.
 Value getArgRef(Value name)
          Returns a reference to the field
 Value getArray(Value name)
          Returns the field value, if unset, creates an array.
 java.util.ArrayList<java.lang.String> getFieldNames()
          Returns the key set.
 Value getObject(Env env, Value name)
          Returns the field value, if unset, creates an object.
 Value getRef(Value name)
          Returns a reference to the field
 void initClass(QuercusClass cl)
          Initialize the quercus class.
 void initClassDef()
          Initialize the quercus class.
 void initInstance(Env env, Value value)
          Creates a new instance.
 boolean isFinal()
           
 Value newInstance()
          Creates a new instance.
 Value put(Value value)
          Adds a value.
 Value put(Value name, Value value)
          Adds a value.
 Value putRef()
          Adds a value.
 Value remove(Value name)
          Removes a value.
 
Methods inherited from class com.caucho.quercus.program.ClassDef
addInterface, addInterfaces, createObject, fieldSet, findConstant, functionSet, getCall, getComment, getExtension, getFieldComment, getInterfaces, getLocation, getName, getParentName, getStaticFieldComment, hasNonPublicMethods, init, init, isA, isAbstract, isInterface, loadClassDef, newInstance, staticFieldSet, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_extFields

protected ArrayValue _extFields

_parent

protected Value _parent

_isFinal

protected boolean _isFinal
Constructor Detail

CompiledClassDef

public CompiledClassDef(java.lang.String name,
                        java.lang.String parent,
                        java.lang.String[] ifaceList)

CompiledClassDef

public CompiledClassDef(Location location,
                        java.lang.String name,
                        java.lang.String parent,
                        java.lang.String[] ifaceList)

CompiledClassDef

public CompiledClassDef(Location location,
                        java.lang.String name,
                        java.lang.String parent,
                        java.lang.String[] ifaceList,
                        boolean isFinal)
Method Detail

initClassDef

public void initClassDef()
Initialize the quercus class.


initClass

public void initClass(QuercusClass cl)
Initialize the quercus class.

Overrides:
initClass in class ClassDef

isFinal

public boolean isFinal()
Overrides:
isFinal in class ClassDef

findFieldIndex

public int findFieldIndex(java.lang.String name)
Returns the field index.


getFieldNames

public java.util.ArrayList<java.lang.String> getFieldNames()
Returns the key set.


addFieldIndex

protected void addFieldIndex(java.lang.String name,
                             int id)
Returns the field index.


findConstructor

public AbstractFunction findConstructor()
Returns the constructor

Specified by:
findConstructor in class ClassDef

initInstance

public void initInstance(Env env,
                         Value value)
Creates a new instance.


get

public Value get(Value name)
Adds a value.


getRef

public Value getRef(Value name)
Returns a reference to the field


getArgRef

public Value getArgRef(Value name)
Returns a reference to the field


getArray

public Value getArray(Value name)
Returns the field value, if unset, creates an array.


getObject

public Value getObject(Env env,
                       Value name)
Returns the field value, if unset, creates an object.


getArg

public Value getArg(Value name)
Returns the field value, if unset, creates an ArgGetValue.


put

public Value put(Value name,
                 Value value)
Adds a value.


put

public Value put(Value value)
Adds a value.


putRef

public Value putRef()
Adds a value.


remove

public Value remove(Value name)
Removes a value.


newInstance

public Value newInstance()
Creates a new instance.


callNew

public Value callNew(Env env,
                     Expr[] args)
Eval new

Overrides:
callNew in class ClassDef

callNew

public Value callNew(Env env,
                     Value[] args)
Eval new

Overrides:
callNew in class ClassDef