com.caucho.quercus.classes
Class LazyClassDef

java.lang.Object
  extended by com.caucho.quercus.program.ClassDef
      extended by com.caucho.quercus.env.CompiledClassDef
          extended by com.caucho.quercus.classes.LazyClassDef

public class LazyClassDef
extends CompiledClassDef

Lazily load a compiled class


Nested Class Summary
 
Nested classes/interfaces inherited from class com.caucho.quercus.program.ClassDef
ClassDef.FieldEntry, ClassDef.StaticFieldEntry
 
Field Summary
 
Fields inherited from class com.caucho.quercus.env.CompiledClassDef
_extFields, _isFinal, _parent
 
Constructor Summary
LazyClassDef(java.lang.String name, java.lang.Class pageClass, java.lang.String className)
           
 
Method Summary
 Value callNew(Env env, Value[] args)
          Creates a new instance.
 ObjectValue createObject(Env env, QuercusClass cls)
           
 java.util.Set<java.util.Map.Entry<StringValue,ClassDef.FieldEntry>> fieldSet()
           
 Expr findConstant(java.lang.String name)
          Finds the matching constant
 AbstractFunction findConstructor()
          Returns the constructor
 int findFieldIndex(java.lang.String name)
          Returns the field index.
 java.util.Set<java.util.Map.Entry<java.lang.String,AbstractFunction>> functionSet()
           
 java.lang.String getComment()
          Returns the documentation for this class.
 java.lang.String getExtension()
           
 java.lang.String getFieldComment(StringValue name)
          Returns the comment for the specified field.
 java.util.ArrayList<java.lang.String> getFieldNames()
          Returns the key set.
 java.lang.String[] getInterfaces()
          Returns the interfaces.
 java.lang.String getName()
          Returns the name.
 java.lang.String getParentName()
          Returns the parent name.
 java.lang.String getStaticFieldComment(java.lang.String name)
          Returns the comment for the specified static field.
 boolean hasNonPublicMethods()
           
 void init()
           
 void initClass(QuercusClass cl)
          Initialize the quercus class.
 void initInstance(Env env, Value value)
          Initialize the quercus class.
 boolean isA(java.lang.String name)
          Returns value for instanceof.
 boolean isAbstract()
          Return true for an abstract class.
 boolean isFinal()
           
 boolean isInterface()
          Return true for an interface class.
 ClassDef loadClassDef()
          forces a load of any lazy ClassDef
 ObjectValue newInstance(Env env, QuercusClass qcl)
          Creates a new instance.
 CompiledClassDef toClassDef()
           
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.quercus.env.CompiledClassDef
addFieldIndex, callNew, get, getArg, getArgRef, getArray, getObject, getRef, initClassDef, newInstance, put, put, putRef, remove
 
Methods inherited from class com.caucho.quercus.program.ClassDef
addInterface, addInterfaces, getCall, getLocation, init, staticFieldSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyClassDef

public LazyClassDef(java.lang.String name,
                    java.lang.Class pageClass,
                    java.lang.String className)
Method Detail

toClassDef

public CompiledClassDef toClassDef()

loadClassDef

public ClassDef loadClassDef()
forces a load of any lazy ClassDef

Overrides:
loadClassDef in class ClassDef

getName

public java.lang.String getName()
Returns the name.

Overrides:
getName in class ClassDef

getParentName

public java.lang.String getParentName()
Returns the parent name.

Overrides:
getParentName in class ClassDef

getExtension

public java.lang.String getExtension()
Overrides:
getExtension in class ClassDef

init

public void init()
Overrides:
init in class ClassDef

getInterfaces

public java.lang.String[] getInterfaces()
Returns the interfaces.

Overrides:
getInterfaces in class ClassDef

isAbstract

public boolean isAbstract()
Return true for an abstract class.

Overrides:
isAbstract in class ClassDef

isInterface

public boolean isInterface()
Return true for an interface class.

Overrides:
isInterface in class ClassDef

isFinal

public boolean isFinal()
Overrides:
isFinal in class CompiledClassDef

getComment

public java.lang.String getComment()
Returns the documentation for this class.

Overrides:
getComment in class ClassDef

getFieldComment

public java.lang.String getFieldComment(StringValue name)
Returns the comment for the specified field.

Overrides:
getFieldComment in class ClassDef

getStaticFieldComment

public java.lang.String getStaticFieldComment(java.lang.String name)
Returns the comment for the specified static field.

Overrides:
getStaticFieldComment in class ClassDef

hasNonPublicMethods

public boolean hasNonPublicMethods()
Overrides:
hasNonPublicMethods in class ClassDef

initClass

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

Overrides:
initClass in class CompiledClassDef

newInstance

public ObjectValue newInstance(Env env,
                               QuercusClass qcl)
Creates a new instance.

Overrides:
newInstance in class ClassDef

createObject

public ObjectValue createObject(Env env,
                                QuercusClass cls)
Overrides:
createObject in class ClassDef

callNew

public Value callNew(Env env,
                     Value[] args)
Creates a new instance.

Overrides:
callNew in class CompiledClassDef

initInstance

public void initInstance(Env env,
                         Value value)
Initialize the quercus class.

Overrides:
initInstance in class CompiledClassDef

isA

public boolean isA(java.lang.String name)
Returns value for instanceof.

Overrides:
isA in class ClassDef

findConstructor

public AbstractFunction findConstructor()
Returns the constructor

Overrides:
findConstructor in class CompiledClassDef

findConstant

public Expr findConstant(java.lang.String name)
Finds the matching constant

Overrides:
findConstant in class ClassDef

findFieldIndex

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

Overrides:
findFieldIndex in class CompiledClassDef

getFieldNames

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

Overrides:
getFieldNames in class CompiledClassDef

fieldSet

public java.util.Set<java.util.Map.Entry<StringValue,ClassDef.FieldEntry>> fieldSet()
Overrides:
fieldSet in class ClassDef

functionSet

public java.util.Set<java.util.Map.Entry<java.lang.String,AbstractFunction>> functionSet()
Overrides:
functionSet in class ClassDef

toString

public java.lang.String toString()
Overrides:
toString in class ClassDef