public class LazyClassDef extends CompiledClassDef
ClassDef.FieldEntry, ClassDef.StaticFieldEntry
_fieldMap, _isFinal, _parent
NULL_STRING_ARRAY
Constructor and Description |
---|
LazyClassDef(java.lang.String name,
java.lang.Class<?> pageClass,
java.lang.String className) |
Modifier and Type | Method and Description |
---|---|
Value |
callNew(Env env,
Value[] args)
Creates a new instance.
|
ObjectValue |
createObject(Env env,
QuercusClass cls)
Creates a new object.
|
java.util.Set<java.util.Map.Entry<StringValue,ClassField>> |
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<StringValue,AbstractFunction>> |
functionSet() |
java.lang.String |
getComment()
Returns the documentation for this class.
|
java.lang.String |
getExtension()
Returns the name of the extension that this class is part of.
|
ClassField |
getField(StringValue name) |
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(StringValue name)
Returns the comment for the specified static field.
|
java.lang.String[] |
getTraits()
Returns the interfaces.
|
boolean |
hasNonPublicMethods()
Returns true if the class has private/protected methods.
|
void |
init() |
void |
initClassFields(QuercusClass cl,
java.lang.String bindingClassName)
Initialize the quercus class fields.
|
void |
initClassMethods(QuercusClass cl,
java.lang.String bindingClassName)
Initialize the quercus class methods.
|
void |
initInstance(Env env,
Value value,
boolean isInitFieldValues)
Initialize the quercus class.
|
boolean |
isA(Env env,
java.lang.String name)
Returns value for instanceof.
|
boolean |
isAbstract()
Return true for an abstract class.
|
boolean |
isFinal()
Returns true for a final class.
|
boolean |
isInterface()
Return true for an interface class.
|
ClassDef |
loadClassDef()
forces a load of any lazy ClassDef
|
CompiledClassDef |
toClassDef() |
java.lang.String |
toString() |
addFieldIndex, callNew, get, getArg, getArgRef, getArray, getObject, getRef, initClassDef, newInstance, put, put, putRef, remove
addInterface, addInterfaces, addTrait, addTraitAlias, addTraitInsteadOf, addTraits, getCall, getCallStatic, getLocation, getSerialize, getTraitAliasMap, getTraitInsteadofMap, getUnserialize, hasTrait, init, isTrait, staticFieldSet
public LazyClassDef(java.lang.String name, java.lang.Class<?> pageClass, java.lang.String className)
public CompiledClassDef toClassDef()
public ClassDef loadClassDef()
loadClassDef
in class ClassDef
public java.lang.String getParentName()
getParentName
in class ClassDef
public java.lang.String getExtension()
ClassDef
getExtension
in class ClassDef
public java.lang.String[] getInterfaces()
getInterfaces
in class ClassDef
public java.lang.String[] getTraits()
public boolean isAbstract()
isAbstract
in class ClassDef
public boolean isInterface()
isInterface
in class ClassDef
public boolean isFinal()
isFinal
in class CompiledClassDef
public java.lang.String getComment()
getComment
in class ClassDef
public java.lang.String getFieldComment(StringValue name)
getFieldComment
in class ClassDef
public java.lang.String getStaticFieldComment(StringValue name)
getStaticFieldComment
in class ClassDef
public boolean hasNonPublicMethods()
ClassDef
hasNonPublicMethods
in class ClassDef
public void initClassMethods(QuercusClass cl, java.lang.String bindingClassName)
initClassMethods
in class CompiledClassDef
cl
- add methods to this QuercusClassbindingClassName
- name of the owning class (for __CLASS__ resolution)public void initClassFields(QuercusClass cl, java.lang.String bindingClassName)
initClassFields
in class CompiledClassDef
cl
- add fields to this QuercusClassbindingClassName
- name of the owning class (for static fields)public ObjectValue createObject(Env env, QuercusClass cls)
createObject
in class ClassDef
public Value callNew(Env env, Value[] args)
callNew
in class CompiledClassDef
public void initInstance(Env env, Value value, boolean isInitFieldValues)
initInstance
in interface InstanceInitializer
initInstance
in class CompiledClassDef
public boolean isA(Env env, java.lang.String name)
public AbstractFunction findConstructor()
findConstructor
in class CompiledClassDef
public Expr findConstant(java.lang.String name)
findConstant
in class ClassDef
public int findFieldIndex(java.lang.String name)
findFieldIndex
in class CompiledClassDef
public java.util.ArrayList<java.lang.String> getFieldNames()
getFieldNames
in class CompiledClassDef
public java.util.Set<java.util.Map.Entry<StringValue,ClassField>> fieldSet()
public ClassField getField(StringValue name)
getField
in class CompiledClassDef
public java.util.Set<java.util.Map.Entry<StringValue,AbstractFunction>> functionSet()
functionSet
in class ClassDef