public class CompiledClassDef extends ClassDef
ClassDef.FieldEntry, ClassDef.StaticFieldEntry
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<StringValue,ClassField> |
_fieldMap |
protected boolean |
_isFinal |
protected Value |
_parent |
NULL_STRING_ARRAY
Constructor and Description |
---|
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(Location location,
java.lang.String name,
java.lang.String parent,
java.lang.String[] ifaceList,
java.lang.String[] traitList) |
CompiledClassDef(Location location,
java.lang.String name,
java.lang.String parent,
java.lang.String[] ifaceList,
java.lang.String[] traitList,
boolean isFinal) |
CompiledClassDef(java.lang.String name,
java.lang.String parent,
java.lang.String[] ifaceList) |
CompiledClassDef(java.lang.String name,
java.lang.String parent,
java.lang.String[] ifaceList,
java.lang.String[] traitList) |
Modifier and Type | Method and Description |
---|---|
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.
|
ClassField |
getField(StringValue name) |
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 |
initClassDef()
Initialize the quercus class.
|
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)
Creates a new instance.
|
boolean |
isFinal()
Returns true for a final class.
|
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.
|
addInterface, addInterfaces, addTrait, addTraitAlias, addTraitInsteadOf, addTraits, createObject, fieldSet, findConstant, functionSet, getCall, getCallStatic, getComment, getExtension, getFieldComment, getInterfaces, getLocation, getName, getParentName, getSerialize, getStaticFieldComment, getTraitAliasMap, getTraitInsteadofMap, getTraits, getUnserialize, hasNonPublicMethods, hasTrait, init, init, isA, isAbstract, isInterface, isTrait, loadClassDef, staticFieldSet, toString
protected final java.util.LinkedHashMap<StringValue,ClassField> _fieldMap
protected Value _parent
protected boolean _isFinal
public CompiledClassDef(java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList)
public CompiledClassDef(java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList, java.lang.String[] traitList)
public CompiledClassDef(Location location, java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList)
public CompiledClassDef(Location location, java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList, boolean isFinal)
public CompiledClassDef(Location location, java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList, java.lang.String[] traitList)
public CompiledClassDef(Location location, java.lang.String name, java.lang.String parent, java.lang.String[] ifaceList, java.lang.String[] traitList, boolean isFinal)
public void initClassDef()
public void initClassMethods(QuercusClass cl, java.lang.String bindingClassName)
initClassMethods
in class ClassDef
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 ClassDef
cl
- add fields to this QuercusClassbindingClassName
- name of the owning class (for static fields)public boolean isFinal()
public int findFieldIndex(java.lang.String name)
public java.util.ArrayList<java.lang.String> getFieldNames()
protected void addFieldIndex(java.lang.String name, int id)
public ClassField getField(StringValue name)
public AbstractFunction findConstructor()
findConstructor
in class ClassDef
public void initInstance(Env env, Value value, boolean isInitFieldValues)
public Value getObject(Env env, Value name)
public Value putRef()
public Value newInstance()