|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.quercus.program.ClassDef
com.caucho.quercus.program.InterpretedClassDef
public class InterpretedClassDef
Represents an interpreted PHP class definition.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.caucho.quercus.program.ClassDef |
---|
ClassDef.FieldEntry, ClassDef.StaticFieldEntry |
Field Summary | |
---|---|
protected AbstractFunction |
_call
|
protected java.lang.String |
_comment
|
protected java.util.HashMap<StringValue,Expr> |
_constMap
|
protected AbstractFunction |
_constructor
|
protected AbstractFunction |
_destructor
|
protected java.util.HashMap<StringValue,ClassDef.FieldEntry> |
_fieldMap
|
protected java.util.HashMap<java.lang.String,AbstractFunction> |
_functionMap
|
protected AbstractFunction |
_getField
|
protected boolean |
_hasNonPublicMethods
|
protected AbstractFunction |
_invoke
|
protected boolean |
_isAbstract
|
protected boolean |
_isFinal
|
protected boolean |
_isInterface
|
protected AbstractFunction |
_isset
|
protected int |
_parseIndex
|
protected AbstractFunction |
_setField
|
protected java.util.HashMap<StringValue,ClassDef.StaticFieldEntry> |
_staticFieldMap
|
protected AbstractFunction |
_toString
|
protected AbstractFunction |
_unset
|
Constructor Summary | |
---|---|
InterpretedClassDef(Location location,
java.lang.String name,
java.lang.String parentName,
java.lang.String[] ifaceList,
int index)
|
|
InterpretedClassDef(java.lang.String name,
java.lang.String parentName,
java.lang.String[] ifaceList)
|
Method Summary | |
---|---|
void |
addConstant(StringValue name,
Expr value)
Adds a const value. |
void |
addFunction(java.lang.String name,
Function fun)
Adds a function. |
void |
addStaticValue(Value name,
Expr value)
Adds a static value. |
void |
addStaticValue(Value name,
Expr value,
java.lang.String comment)
Adds a static value. |
void |
addValue(Value name,
Expr value,
FieldVisibility visibility)
Adds a value. |
void |
addValue(Value name,
Expr value,
FieldVisibility visibility,
java.lang.String comment)
Adds a value. |
java.util.Set<java.util.Map.Entry<StringValue,ClassDef.FieldEntry>> |
fieldSet()
|
Expr |
findConstant(java.lang.String name)
Return a const value. |
AbstractFunction |
findConstructor()
Returns the constructor |
java.util.Set<java.util.Map.Entry<java.lang.String,AbstractFunction>> |
functionSet()
|
Expr |
get(Value name)
Adds a value. |
java.lang.String |
getComment()
Returns the documentation for this class. |
java.lang.String |
getCompilationName()
|
java.lang.String |
getFieldComment(StringValue name)
Returns the comment for the specified field. |
boolean |
getHasNonPublicMethods()
|
java.lang.String |
getStaticFieldComment(StringValue name)
Returns the comment for the specified field. |
void |
init(Env env)
Initialize the class. |
void |
initClass(QuercusClass cl)
Initialize the quercus class. |
void |
initInstance(Env env,
Value value)
Initialize the fields |
boolean |
isAbstract()
True for an abstract class. |
boolean |
isDeclaredField(StringValue name)
Return true for a declared field. |
boolean |
isFinal()
|
boolean |
isInterface()
True for an interface class. |
boolean |
isTopScope()
True if defined at the top-level scope |
void |
setAbstract(boolean isAbstract)
true for an abstract class. |
void |
setComment(java.lang.String comment)
Sets the documentation for this class. |
void |
setConstructor(AbstractFunction fun)
Sets the constructor. |
void |
setFinal(boolean isFinal)
|
void |
setInterface(boolean isInterface)
true for an interface class. |
void |
setTopScope(boolean isTopScope)
True if defined at the top-level scope |
java.util.Set<java.util.Map.Entry<StringValue,ClassDef.StaticFieldEntry>> |
staticFieldSet()
|
Methods inherited from class com.caucho.quercus.program.ClassDef |
---|
addInterface, addInterfaces, callNew, callNew, createObject, getCall, getExtension, getInterfaces, getLocation, getName, getParentName, hasNonPublicMethods, init, init, isA, loadClassDef, newInstance, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean _isAbstract
protected boolean _isInterface
protected boolean _isFinal
protected boolean _hasNonPublicMethods
protected final java.util.HashMap<java.lang.String,AbstractFunction> _functionMap
protected final java.util.HashMap<StringValue,ClassDef.FieldEntry> _fieldMap
protected final java.util.HashMap<StringValue,ClassDef.StaticFieldEntry> _staticFieldMap
protected final java.util.HashMap<StringValue,Expr> _constMap
protected AbstractFunction _constructor
protected AbstractFunction _destructor
protected AbstractFunction _getField
protected AbstractFunction _setField
protected AbstractFunction _isset
protected AbstractFunction _unset
protected AbstractFunction _call
protected AbstractFunction _invoke
protected AbstractFunction _toString
protected int _parseIndex
protected java.lang.String _comment
Constructor Detail |
---|
public InterpretedClassDef(Location location, java.lang.String name, java.lang.String parentName, java.lang.String[] ifaceList, int index)
public InterpretedClassDef(java.lang.String name, java.lang.String parentName, java.lang.String[] ifaceList)
Method Detail |
---|
public void setAbstract(boolean isAbstract)
public boolean isAbstract()
isAbstract
in class ClassDef
public void setInterface(boolean isInterface)
public boolean isInterface()
isInterface
in class ClassDef
public void setFinal(boolean isFinal)
public boolean isFinal()
isFinal
in class ClassDef
public boolean getHasNonPublicMethods()
public boolean isTopScope()
public void setTopScope(boolean isTopScope)
public java.lang.String getCompilationName()
public void initClass(QuercusClass cl)
initClass
in class ClassDef
public void setConstructor(AbstractFunction fun)
public void addFunction(java.lang.String name, Function fun)
public void addStaticValue(Value name, Expr value)
public void addStaticValue(Value name, Expr value, java.lang.String comment)
public void addConstant(StringValue name, Expr value)
public Expr findConstant(java.lang.String name)
findConstant
in class ClassDef
public void addValue(Value name, Expr value, FieldVisibility visibility)
public void addValue(Value name, Expr value, FieldVisibility visibility, java.lang.String comment)
public Expr get(Value name)
public boolean isDeclaredField(StringValue name)
public void init(Env env)
public void initInstance(Env env, Value value)
initInstance
in interface InstanceInitializer
public AbstractFunction findConstructor()
findConstructor
in class ClassDef
public void setComment(java.lang.String comment)
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 java.util.Set<java.util.Map.Entry<StringValue,ClassDef.FieldEntry>> fieldSet()
fieldSet
in class ClassDef
public java.util.Set<java.util.Map.Entry<StringValue,ClassDef.StaticFieldEntry>> staticFieldSet()
staticFieldSet
in class ClassDef
public java.util.Set<java.util.Map.Entry<java.lang.String,AbstractFunction>> functionSet()
functionSet
in class ClassDef
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |