public class JavaClassDef extends ClassDef implements InstanceInitializer
ClassDef.FieldEntry, ClassDef.StaticFieldEntry
Modifier and Type | Field and Description |
---|---|
protected boolean |
_isInit |
NULL_STRING_ARRAY
Constructor and Description |
---|
JavaClassDef(ModuleContext moduleContext,
java.lang.String name,
java.lang.Class<?> type) |
JavaClassDef(ModuleContext moduleContext,
java.lang.String name,
java.lang.Class<?> type,
java.lang.String extension) |
Modifier and Type | Method and Description |
---|---|
void |
addInterfaces(java.util.HashSet<java.lang.String> interfaceSet)
Adds the interfaces to the set
|
protected void |
addInterfaces(java.util.HashSet<java.lang.String> interfaceSet,
java.lang.Class<?> type,
boolean isTop) |
Value |
callMethod(Env env,
Value qThis,
StringValue methodName,
int hash)
Eval a method
|
Value |
callMethod(Env env,
Value qThis,
StringValue methodName,
int hash,
Value a1)
Eval a method
|
Value |
callMethod(Env env,
Value qThis,
StringValue methodName,
int hash,
Value[] args)
Eval a method
|
Value |
callMethod(Env env,
Value qThis,
StringValue methodName,
int hash,
Value a1,
Value a2)
Eval a method
|
Value |
callMethod(Env env,
Value qThis,
StringValue methodName,
int hash,
Value a1,
Value a2,
Value a3)
Eval a method
|
Value |
callMethod(Env env,
Value qThis,
StringValue methodName,
int hash,
Value a1,
Value a2,
Value a3,
Value a4)
Eval a method
|
Value |
callMethod(Env env,
Value qThis,
StringValue methodName,
int hash,
Value a1,
Value a2,
Value a3,
Value a4,
Value a5)
Eval a method
|
Value |
callNew(Env env,
Value[] args)
Eval new
|
int |
cmpObject(java.lang.Object lValue,
java.lang.Object rValue,
JavaClassDef rClassDef) |
static JavaClassDef |
create(ModuleContext moduleContext,
java.lang.String name,
java.lang.Class<?> type) |
java.util.Set<? extends java.util.Map.Entry<Value,Value>> |
entrySet(java.lang.Object obj) |
Value |
findConstant(Env env,
java.lang.String name)
Finds the matching constant
|
AbstractFunction |
findConstructor()
Returns the constructor
|
AbstractFunction |
findFunction(StringValue methodName)
Eval a method
|
AbstractFunction |
getCall() |
AbstractFunction |
getCallStatic() |
JavaClassDef |
getComponentDef() |
java.lang.String |
getExtension()
Returns the name of the extension that this class is part of.
|
Value |
getField(Env env,
Value qThis,
StringValue nameV)
Returns the field getter.
|
Marshal |
getMarshal()
Returns the marshal instance.
|
protected ModuleContext |
getModuleContext() |
java.lang.String |
getName()
Returns the class name.
|
QuercusClass |
getQuercusClass()
Returns the quercus class
|
java.lang.String |
getResourceType()
Returns the type of this resource.
|
AbstractFunction |
getSerialize() |
java.lang.String |
getSimpleName()
Returns the class name.
|
JavaMethod |
getToString() |
java.lang.Class<?> |
getType() |
AbstractFunction |
getUnserialize() |
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)
Creates a new instance.
|
boolean |
isA(Env env,
java.lang.String name)
Returns value for instanceof.
|
boolean |
isAbstract()
Return true for an abstract class.
|
boolean |
isArray() |
boolean |
isDelegate() |
boolean |
isInterface()
Return true for an interface class.
|
boolean |
isPhpClass() |
boolean |
issetField(Env env,
java.lang.Object obj,
StringValue name) |
boolean |
jsonEncode(Env env,
java.lang.Object obj,
JsonEncodeContext context,
StringValue sb) |
boolean |
printRImpl(Env env,
java.lang.Object obj,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet) |
Value |
putField(Env env,
Value qThis,
StringValue nameV,
Value value) |
void |
setPhpClass(boolean isPhpClass) |
StringValue |
toString(Env env,
JavaValue value) |
boolean |
varDumpImpl(Env env,
Value obj,
java.lang.Object javaObj,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet) |
Value |
wrap(Env env,
java.lang.Object obj) |
addInterface, addTrait, addTraitAlias, addTraitInsteadOf, addTraits, callNew, createObject, fieldSet, findConstant, functionSet, getComment, getField, getFieldComment, getInterfaces, getLocation, getParentName, getStaticFieldComment, getTraitAliasMap, getTraitInsteadofMap, getTraits, hasNonPublicMethods, hasTrait, init, isFinal, isTrait, loadClassDef, staticFieldSet, toString
public JavaClassDef(ModuleContext moduleContext, java.lang.String name, java.lang.Class<?> type)
public JavaClassDef(ModuleContext moduleContext, java.lang.String name, java.lang.Class<?> type, java.lang.String extension)
public static JavaClassDef create(ModuleContext moduleContext, java.lang.String name, java.lang.Class<?> type)
public java.lang.String getName()
public java.lang.String getSimpleName()
public java.lang.Class<?> getType()
public java.lang.String getResourceType()
protected ModuleContext getModuleContext()
public java.lang.String getExtension()
getExtension
in class ClassDef
public boolean isA(Env env, java.lang.String name)
ClassDef
public void addInterfaces(java.util.HashSet<java.lang.String> interfaceSet)
addInterfaces
in class ClassDef
protected void addInterfaces(java.util.HashSet<java.lang.String> interfaceSet, java.lang.Class<?> type, boolean isTop)
public boolean isAbstract()
ClassDef
isAbstract
in class ClassDef
public boolean isArray()
public boolean isInterface()
ClassDef
isInterface
in class ClassDef
public boolean isDelegate()
public void setPhpClass(boolean isPhpClass)
public boolean isPhpClass()
public JavaClassDef getComponentDef()
public int cmpObject(java.lang.Object lValue, java.lang.Object rValue, JavaClassDef rClassDef)
public Value getField(Env env, Value qThis, StringValue nameV)
name
- public Value putField(Env env, Value qThis, StringValue nameV, Value value)
public Marshal getMarshal()
public AbstractFunction getCall()
public AbstractFunction getCallStatic()
getCallStatic
in class ClassDef
public AbstractFunction getSerialize()
getSerialize
in class ClassDef
public AbstractFunction getUnserialize()
getUnserialize
in class ClassDef
public AbstractFunction findFunction(StringValue methodName)
public Value callMethod(Env env, Value qThis, StringValue methodName, int hash, Value[] args)
public Value callMethod(Env env, Value qThis, StringValue methodName, int hash)
public Value callMethod(Env env, Value qThis, StringValue methodName, int hash, Value a1)
public Value callMethod(Env env, Value qThis, StringValue methodName, int hash, Value a1, Value a2)
public Value callMethod(Env env, Value qThis, StringValue methodName, int hash, Value a1, Value a2, Value a3)
public Value callMethod(Env env, Value qThis, StringValue methodName, int hash, Value a1, Value a2, Value a3, Value a4)
public Value callMethod(Env env, Value qThis, StringValue methodName, int hash, Value a1, Value a2, Value a3, Value a4, Value a5)
public java.util.Set<? extends java.util.Map.Entry<Value,Value>> entrySet(java.lang.Object obj)
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 void initInstance(Env env, Value value, boolean isInitFieldValues)
initInstance
in interface InstanceInitializer
public QuercusClass getQuercusClass()
public AbstractFunction findConstructor()
findConstructor
in class ClassDef
public JavaMethod getToString()
public StringValue toString(Env env, JavaValue value)
public boolean issetField(Env env, java.lang.Object obj, StringValue name)
public boolean jsonEncode(Env env, java.lang.Object obj, JsonEncodeContext context, StringValue sb)
public boolean printRImpl(Env env, java.lang.Object obj, WriteStream out, int depth, java.util.IdentityHashMap<Value,java.lang.String> valueSet) throws java.io.IOException
java.io.IOException
public boolean varDumpImpl(Env env, Value obj, java.lang.Object javaObj, WriteStream out, int depth, java.util.IdentityHashMap<Value,java.lang.String> valueSet) throws java.io.IOException
java.io.IOException