public abstract class AbstractFunction extends Callback
Modifier and Type | Field and Description |
---|---|
protected QuercusClass |
_bindingClass |
protected java.lang.String |
_declaringClassName |
protected boolean |
_isClosure |
protected boolean |
_isConstructor |
protected boolean |
_isFinal |
protected boolean |
_isStatic |
protected boolean |
_isTraitMethod |
protected int |
_parseIndex |
protected Visibility |
_visibility |
static Arg[] |
NULL_ARGS |
NULL_VALUE_ARRAY
Constructor and Description |
---|
AbstractFunction() |
AbstractFunction(Location location) |
Modifier and Type | Method and Description |
---|---|
Value |
call(Env env)
Evaluates the function.
|
Value |
call(Env env,
Value a1)
Evaluates the function with an argument .
|
abstract Value |
call(Env env,
Value[] args)
Evaluates the function.
|
Value |
call(Env env,
Value a1,
Value a2)
Evaluates the function with arguments
|
Value |
call(Env env,
Value a1,
Value a2,
Value a3)
Evaluates the function with arguments
|
Value |
call(Env env,
Value a1,
Value a2,
Value a3,
Value a4)
Evaluates the function with arguments
|
Value |
call(Env env,
Value a1,
Value a2,
Value a3,
Value a4,
Value a5)
Evaluates the function with arguments
|
Value |
callClosure(Env env,
Value[] args,
Value[] useArgs)
Evaluates the function as a closure.
|
Value |
callCopy(Env env,
Value[] args)
Evaluates the function, returning a copy
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis)
Evaluates the function as a method call.
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Expr[] exprs)
Evaluates the function.
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value a1)
Evaluates the function as a method call.
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value[] args)
Evaluates the method call.
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2)
Evaluates the function as a method call.
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2,
Value a3)
Evaluates the function as a method call.
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2,
Value a3,
Value a4)
Evaluates the function as a method call.
|
Value |
callMethod(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2,
Value a3,
Value a4,
Value a5)
Evaluates the function as a method call.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis)
Evaluates the function as a method call.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Expr[] exprs)
Evaluates the function.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Value a1)
Evaluates the function as a method call.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Value[] args)
Evaluates the method call, returning a reference.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2)
Evaluates the function as a method call.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2,
Value a3)
Evaluates the function as a method call.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2,
Value a3,
Value a4)
Evaluates the function as a method call.
|
Value |
callMethodRef(Env env,
QuercusClass qClass,
Value qThis,
Value a1,
Value a2,
Value a3,
Value a4,
Value a5)
Evaluates the function as a method call.
|
Value |
callNew(Env env,
QuercusClass qClass,
Value qThis,
Value[] args)
Evaluates the new() method call.
|
Value |
callRef(Env env)
Evaluates the function.
|
Value |
callRef(Env env,
Value a1)
Evaluates the function with an argument .
|
Value |
callRef(Env env,
Value[] args)
Evaluates the function, returning a reference.
|
Value |
callRef(Env env,
Value a1,
Value a2)
Evaluates the function with arguments
|
Value |
callRef(Env env,
Value a1,
Value a2,
Value a3)
Evaluates the function with arguments
|
Value |
callRef(Env env,
Value a1,
Value a2,
Value a3,
Value a4)
Evaluates the function with arguments
|
Value |
callRef(Env env,
Value a1,
Value a2,
Value a3,
Value a4,
Value a5)
Evaluates the function with arguments
|
protected Value |
errorPrivateAccess(Env env,
Value oldThis) |
protected Value |
errorProtectedAccess(Env env,
Value oldThis) |
Value[] |
evalArguments(Env env,
Expr fun,
Expr[] args)
Binds the user's arguments to the actual arguments.
|
AbstractFunction |
getActualFunction(Expr[] args)
Returns the actual function
|
Arg[] |
getArgs(Env env)
Returns the formal arguments.
|
QuercusClass |
getBindingClass() |
java.lang.String |
getBindingClassName()
Returns the name of class lexically binding the method
|
java.lang.String |
getCallbackName()
Returns the name of the callback.
|
Arg[] |
getClosureUseArgs()
Returns the args.
|
java.lang.String |
getComment()
Returns the documentation for this function.
|
java.lang.String |
getCompilationName() |
ClassDef |
getDeclaringClass()
Returns the implementing class.
|
java.lang.String |
getDeclaringClassName()
Returns the name of class lexically declaring the method
|
java.lang.String |
getDeclComment(Env env)
Returns the comment in the file where this is defined in.
|
int |
getDeclEndLine(Env env)
Returns the end line in the file where this is defined in.
|
java.lang.String |
getDeclFileName(Env env)
Returns the name of the file where this is defined in.
|
int |
getDeclStartLine(Env env)
Returns the start line in the file where this is defined in.
|
Location |
getLocation() |
java.lang.String |
getName() |
java.lang.String |
getType()
Returns the type.
|
boolean |
isAbstract()
Returns true for an abstract function.
|
boolean |
isBoolean()
Returns true for a boolean function.
|
boolean |
isCallable(Env env,
boolean isCheckSyntaxOnly,
Value nameRef)
The object is callable if it has an __invoke method
|
boolean |
isCallUsesSymbolTable()
Returns true if the function uses/modifies the local symbol table
|
boolean |
isCallUsesVariableArgs()
Returns true if the function uses variable args.
|
boolean |
isClosure()
Returns true for a closure.
|
boolean |
isConstructor()
Returns true for a constructor.
|
boolean |
isDouble()
Returns true for a double function.
|
boolean |
isFinal()
Returns true for a final function.
|
boolean |
isGlobal()
Returns true for a global function.
|
boolean |
isInternal(Env env)
Returns true if this callback is implemented internally (i.e.
|
boolean |
isJavaMethod() |
boolean |
isLong()
Returns true for a long function.
|
boolean |
isObject()
Returns true for an object
|
boolean |
isPrivate()
Returns true for a private function.
|
boolean |
isProtected()
Returns true for a protected function.
|
boolean |
isPublic()
Returns true for a protected function.
|
boolean |
isReturnsReference(Env env)
Returns true if this returns a reference.
|
boolean |
isStatic()
Returns true for a static function.
|
boolean |
isString()
Returns true for a string function.
|
boolean |
isTraitMethod()
Returns true for a trait method.
|
boolean |
isValid(Env env)
Checks for a valid callback.
|
void |
setBindingClass(QuercusClass qcl) |
void |
setClosure(boolean isClosure)
Sets true if function is a closure.
|
void |
setClosureUseArgs(Arg[] useArgs)
Returns the args.
|
void |
setConstructor(boolean isConstructor)
True for a constructor.
|
void |
setDeclaringClassName(java.lang.String name) |
void |
setFinal(boolean isFinal) |
void |
setGlobal(boolean isGlobal)
Returns true for a global function.
|
void |
setParseIndex(int index) |
void |
setStatic(boolean isStatic)
Sets true if function is static.
|
void |
setTraitMethod(boolean isTraitMethod)
True for a trait method.
|
void |
setVisibility(Visibility v) |
AbstractFunction |
toFun()
For lazy functions, returns the actual function
|
java.lang.String |
toString() |
callArray, callArray, callArray, toCallable
abs, add, add, addOne, append, appendTo, appendTo, appendTo, appendTo, bitAnd, bitOr, bitXor, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, charValueAt, checkPrivate, checkProtected, clone, cmp, containsKey, copy, copy, copy, copyArrayItem, copyReturn, copySaveFunArg, copyStringBuilder, copyTree, current, div, div, end, eq, eql, eqValue, findFunction, findQuercusClass, generate, geq, get, get, getArg, getArgTail, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getHashCode, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getObjectHash, getQuercusClass, getRef, getResourceType, getSize, getStaticFieldValue, getStaticFieldVar, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getValueArray, getValueIterator, getValueType, getVar, gt, hasCurrent, hashCode, increment, initField, initField, initField, initIncompleteField, isA, isA, isArray, isBinary, isDefault, isDoubleConvertible, isEmpty, isEmpty, isFieldExists, isFieldInit, isLongConvertible, isNull, isNumberConvertible, isNumeric, isResource, isset, isset, issetField, issetThisField, isUnicode, isVar, jsonEncode, key, keyExists, length, leq, lshift, lt, mod, mul, mul, neg, next, nextIndex, pop, pos, postdecr, postincr, postincr, predecr, preincr, preincr, prev, print, print, printDepth, printJavaChar, printJavaString, printR, printRImpl, put, put, put, putArray, putField, putField, putField, putObject, putThisField, putThisField, putThisFieldArray, putVar, remove, reset, rshift, serialize, serialize, set, setCharValueAt, setFieldInit, setJavaObject, setStaticFieldRef, shuffle, sub_rev, sub, sub, subOne, toArgRef, toArray, toArrayValue, toAutoArray, toAutoObject, toBigDecimal, toBigInteger, toBinaryValue, toBinaryValue, toBinaryValue, toBinaryValueMarshalCost, toBoolean, toBooleanMarshalCost, toByteArrayMarshalCost, toByteMarshalCost, toChar, toCharArrayMarshalCost, toCharMarshalCost, toDebugString, toDouble, toDouble, toDouble, toDouble, toDouble, toDoubleMarshalCost, toDoubleValue, toException, toFloatMarshalCost, toInputStream, toInt, toIntegerMarshalCost, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaEnum, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toKey, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLong, toLong, toLong, toLong, toLong, toLongMarshalCost, toLongValue, toObject, toRef, toRefValue, toShortMarshalCost, toString, toStringBuilder, toStringBuilder, toStringBuilder, toStringBuilder, toStringMarshalCost, toStringValue, toStringValue, toStringValueMarshalCost, toUnicode, toUnicodeValue, toUnicodeValue, toUnicodeValueMarshalCost, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, unsetThisPrivateField, valuesToArray, varDump, varDumpImpl, varExport, varExportImpl
public static final Arg[] NULL_ARGS
protected boolean _isStatic
protected boolean _isFinal
protected boolean _isConstructor
protected boolean _isClosure
protected boolean _isTraitMethod
protected Visibility _visibility
protected java.lang.String _declaringClassName
protected QuercusClass _bindingClass
protected int _parseIndex
public AbstractFunction()
public AbstractFunction(Location location)
public java.lang.String getName()
public java.lang.String getCallbackName()
Callback
getCallbackName
in interface Callable
getCallbackName
in class Callback
public boolean isInternal(Env env)
Callback
isInternal
in class Callback
public boolean isValid(Env env)
Callable
public java.lang.String getDeclFileName(Env env)
public int getDeclStartLine(Env env)
public int getDeclEndLine(Env env)
public java.lang.String getDeclComment(Env env)
public boolean isReturnsReference(Env env)
public Arg[] getArgs(Env env)
Callable
public boolean isJavaMethod()
public final java.lang.String getCompilationName()
public java.lang.String getDeclaringClassName()
public void setDeclaringClassName(java.lang.String name)
public java.lang.String getBindingClassName()
public void setBindingClass(QuercusClass qcl)
public QuercusClass getBindingClass()
public ClassDef getDeclaringClass()
public final boolean isGlobal()
public boolean isAbstract()
public void setStatic(boolean isStatic)
public boolean isStatic()
public boolean isFinal()
public final void setFinal(boolean isFinal)
public void setClosure(boolean isClosure)
public boolean isClosure()
public boolean isConstructor()
public final void setConstructor(boolean isConstructor)
public boolean isTraitMethod()
public void setTraitMethod(boolean isTraitMethod)
public boolean isPublic()
public boolean isProtected()
public boolean isPrivate()
public final void setVisibility(Visibility v)
public final void setParseIndex(int index)
public final Location getLocation()
public final void setGlobal(boolean isGlobal)
public boolean isBoolean()
public boolean isString()
public boolean isDouble()
public boolean isCallUsesVariableArgs()
public boolean isCallUsesSymbolTable()
public Arg[] getClosureUseArgs()
public void setClosureUseArgs(Arg[] useArgs)
public AbstractFunction toFun()
public AbstractFunction getActualFunction(Expr[] args)
public java.lang.String getComment()
public Value[] evalArguments(Env env, Expr fun, Expr[] args)
args
- the user's argumentspublic java.lang.String getType()
Value
public boolean isCallable(Env env, boolean isCheckSyntaxOnly, Value nameRef)
isCallable
in class Value
public Value callClosure(Env env, Value[] args, Value[] useArgs)
public Value call(Env env, Value a1, Value a2, Value a3, Value a4)
public Value call(Env env, Value a1, Value a2, Value a3, Value a4, Value a5)
public Value callRef(Env env, Value a1, Value a2, Value a3)
public Value callRef(Env env, Value a1, Value a2, Value a3, Value a4)
public Value callRef(Env env, Value a1, Value a2, Value a3, Value a4, Value a5)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Value[] args)
public Value callNew(Env env, QuercusClass qClass, Value qThis, Value[] args)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value[] args)
public Value callMethod(Env env, QuercusClass qClass, Value qThis)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Value a1)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value a1)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2, Value a3)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2, Value a3)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2, Value a3, Value a4)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2, Value a3, Value a4)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2, Value a3, Value a4, Value a5)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Value a1, Value a2, Value a3, Value a4, Value a5)
public Value callMethod(Env env, QuercusClass qClass, Value qThis, Expr[] exprs)
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis, Expr[] exprs)