|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.env.Value
com.caucho.quercus.env.Callback
com.caucho.quercus.function.AbstractFunction
com.caucho.quercus.env.AbstractJavaMethod
com.caucho.quercus.env.JavaInvoker
public abstract class JavaInvoker
Represents the introspected static function information.
| Field Summary |
|---|
| Fields inherited from class com.caucho.quercus.function.AbstractFunction |
|---|
_bindingClass, _declaringClassName, _isClosure, _isConstructor, _isFinal, _isStatic, _parseIndex, _visibility |
| Fields inherited from class com.caucho.quercus.env.Value |
|---|
NULL_VALUE_ARRAY, SCALAR_V |
| Constructor Summary | |
|---|---|
JavaInvoker(ModuleContext moduleContext,
java.lang.reflect.Method method)
Creates the statically introspected function. |
|
JavaInvoker(ModuleContext moduleContext,
java.lang.String name,
java.lang.Class<?>[] param,
java.lang.annotation.Annotation[][] paramAnn,
java.lang.annotation.Annotation[] methodAnn,
java.lang.Class<?> retType)
Creates the statically introspected function. |
|
| Method Summary | |
|---|---|
Value |
call(Env env,
Value[] args)
Evaluates the function. |
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value[] args)
Evaluates the method call. |
Value[] |
evalArguments(Env env,
Expr fun,
Expr[] args)
Evaluates a function's argument, handling ref vs non-ref |
protected Expr[] |
getDefaultExprs()
Returns the default expressions. |
boolean |
getHasEnv()
Returns true if the environment is an argument. |
boolean |
getHasRestArgs()
Returns true if the environment has rest-style arguments. |
Marshal[] |
getMarshalArgs()
Returns the marshal arguments. |
int |
getMarshalingCost(Expr[] args)
|
int |
getMarshalingCost(Value[] args)
Returns the cost of marshaling for this method. |
int |
getMaxArgLength()
Returns the maximum number of arguments allowed. |
protected java.lang.annotation.Annotation[] |
getMethodAnn()
Returns the parameter annotations. |
int |
getMinArgLength()
Returns the minimally required number of arguments. |
java.lang.String |
getName()
|
protected java.lang.annotation.Annotation[][] |
getParamAnn()
Returns the parameter annotations. |
Marshal |
getUnmarshalReturn()
Returns the unmarshaller for the return |
void |
init()
|
abstract java.lang.Object |
invoke(java.lang.Object obj,
java.lang.Object[] args)
|
boolean |
isBoolean()
Returns true if the result is a boolean. |
boolean |
isCallUsesSymbolTable()
Returns true if the call uses the symbol table |
boolean |
isCallUsesVariableArgs()
Returns true if the call uses variable arguments. |
boolean |
isDouble()
Returns true if the result is a double. |
boolean |
isLong()
Returns true if the result is a long. |
boolean |
isRestReference()
Returns true if the rest argument is a reference. |
boolean |
isString()
Returns true if the result is a string. |
| Methods inherited from class com.caucho.quercus.env.AbstractJavaMethod |
|---|
call, call, call, call, call, call, callCopy, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, getJavaDeclaringClass, getJavaParameterTypes, overload |
| Methods inherited from class com.caucho.quercus.function.AbstractFunction |
|---|
callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callRef, callRef, callRef, callRef, callRef, callRef, callRef, errorPrivateAccess, errorProtectedAccess, getActualFunction, getArgs, getBindingClass, getBindingClassName, getCallbackName, getComment, getCompilationName, getDeclaringClass, getDeclaringClassName, getLocation, getType, isAbstract, isClosure, isConstructor, isFinal, isGlobal, isInternal, isObject, isPrivate, isProtected, isPublic, isReturnsReference, isStatic, isValid, setBindingClass, setClosure, setConstructor, setDeclaringClassName, setFinal, setGlobal, setParseIndex, setStatic, setVisibility, toFun, toString |
| Methods inherited from class com.caucho.quercus.env.Callback |
|---|
callArray, callArray, callArray, toCallable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JavaInvoker(ModuleContext moduleContext,
java.lang.String name,
java.lang.Class<?>[] param,
java.lang.annotation.Annotation[][] paramAnn,
java.lang.annotation.Annotation[] methodAnn,
java.lang.Class<?> retType)
public JavaInvoker(ModuleContext moduleContext,
java.lang.reflect.Method method)
| Method Detail |
|---|
public void init()
public int getMinArgLength()
getMinArgLength in class AbstractJavaMethodpublic int getMaxArgLength()
getMaxArgLength in class AbstractJavaMethodpublic boolean getHasEnv()
public boolean getHasRestArgs()
getHasRestArgs in class AbstractJavaMethodpublic boolean isRestReference()
public Marshal getUnmarshalReturn()
public boolean isCallUsesVariableArgs()
isCallUsesVariableArgs in class AbstractFunctionpublic boolean isCallUsesSymbolTable()
isCallUsesSymbolTable in class AbstractFunctionpublic boolean isBoolean()
isBoolean in class AbstractFunctionpublic boolean isString()
isString in class AbstractFunctionpublic boolean isLong()
isLong in class AbstractFunctionpublic boolean isDouble()
isDouble in class AbstractFunctionpublic java.lang.String getName()
getName in class AbstractFunctionpublic Marshal[] getMarshalArgs()
protected java.lang.annotation.Annotation[][] getParamAnn()
protected java.lang.annotation.Annotation[] getMethodAnn()
protected Expr[] getDefaultExprs()
public Value[] evalArguments(Env env,
Expr fun,
Expr[] args)
evalArguments in class AbstractFunctionargs - the user's arguments
public int getMarshalingCost(Value[] args)
getMarshalingCost in class AbstractJavaMethodpublic int getMarshalingCost(Expr[] args)
getMarshalingCost in class AbstractJavaMethod
public Value call(Env env,
Value[] args)
AbstractFunction
call in interface Callablecall in class AbstractJavaMethodenv - the calling environment
public Value callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value[] args)
AbstractFunction
callMethod in class AbstractJavaMethod
public abstract java.lang.Object invoke(java.lang.Object obj,
java.lang.Object[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||