com.caucho.quercus.env
Class CallbackFunction

java.lang.Object
  extended by com.caucho.quercus.env.Value
      extended by com.caucho.quercus.env.Callback
          extended by com.caucho.quercus.env.CallbackFunction
All Implemented Interfaces:
Callable, java.io.Serializable
Direct Known Subclasses:
UrlRewriterCallback

public class CallbackFunction
extends Callback

Represents a call to a function.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.quercus.env.Value
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V
 
Constructor Summary
CallbackFunction(AbstractFunction fun)
           
CallbackFunction(AbstractFunction fun, java.lang.String funName)
           
CallbackFunction(Env env, java.lang.String funName)
           
 
Method Summary
 Value call(Env env)
          Evaluates the callback with no arguments.
 Value call(Env env, Value a1)
          Evaluates the callback with 1 argument.
 Value call(Env env, Value[] args)
          Evaluates the callback with variable arguments.
 Value call(Env env, Value a1, Value a2)
          Evaluates the callback with 2 arguments.
 Value call(Env env, Value a1, Value a2, Value a3)
          Evaluates the callback with 3 arguments.
 Value call(Env env, Value a1, Value a2, Value a3, Value a4)
          Evaluates the callback with 3 arguments.
 Value call(Env env, Value a1, Value a2, Value a3, Value a4, Value a5)
          Evaluates the callback with 3 arguments.
 java.lang.String getCallbackName()
          Returns the name of the callback.
 AbstractFunction getFunction(Env env)
           
 boolean isInternal(Env env)
          Returns true if this callback is implemented internally (i.e.
 boolean isValid(Env env)
          Checks for a valid callback.
 void serialize(Env env, java.lang.StringBuilder sb)
          Serializes the value.
protected  void setFunction(AbstractFunction fun)
          Allow subclasses to set the abstract function directly.
 java.lang.String toString()
           
 void varExport(java.lang.StringBuilder sb)
          Exports the value.
 
Methods inherited from class com.caucho.quercus.env.Callback
callArray, callArray, callArray, toCallable
 
Methods inherited from class com.caucho.quercus.env.Value
abs, add, add, addOne, append, appendTo, appendTo, appendTo, appendTo, bitAnd, bitOr, bitXor, callCopy, 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, callRef, callRef, callRef, callRef, callRef, callRef, callRef, charValueAt, checkPrivate, checkProtected, clone, cmp, containsKey, copy, copy, copy, copyArrayItem, copyReturn, copySaveFunArg, copyStringBuilder, copyTree, current, div, div, end, eq, eql, eqValue, findFunction, generate, geq, get, getArg, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getHashCode, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getQuercusClass, getRef, getResourceType, getSize, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getType, getValueArray, getValueIterator, getValueType, getVar, gt, hasCurrent, hashCode, increment, initField, isA, isA, isArray, isBinary, isBoolean, isCallable, isDefault, isDouble, isDoubleConvertible, isEmpty, isFieldInit, isLong, isLongConvertible, isNull, isNumberConvertible, isNumeric, isObject, isResource, isset, isset, issetField, issetThisField, isString, 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, putField, putField, putField, putObject, putThisField, putThisField, putVar, remove, reset, rshift, serialize, set, setCharValueAt, setFieldInit, setJavaObject, 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, toDoubleMarshalCost, toDoubleValue, toException, toFloatMarshalCost, toInputStream, toInt, toIntegerMarshalCost, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toKey, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, 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, valuesToArray, varDump, varDumpImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallbackFunction

public CallbackFunction(Env env,
                        java.lang.String funName)

CallbackFunction

public CallbackFunction(AbstractFunction fun)

CallbackFunction

public CallbackFunction(AbstractFunction fun,
                        java.lang.String funName)
Method Detail

setFunction

protected void setFunction(AbstractFunction fun)
Allow subclasses to set the abstract function directly.


isValid

public boolean isValid(Env env)
Description copied from interface: Callable
Checks for a valid callback.

Specified by:
isValid in interface Callable
Specified by:
isValid in class Callback
Returns:
true if this is an invalid callback reference

serialize

public void serialize(Env env,
                      java.lang.StringBuilder sb)
Serializes the value.

Overrides:
serialize in class Value

call

public Value call(Env env)
Evaluates the callback with no arguments.

Specified by:
call in interface Callable
Overrides:
call in class Value
Parameters:
env - the calling environment

call

public Value call(Env env,
                  Value a1)
Evaluates the callback with 1 argument.

Specified by:
call in interface Callable
Overrides:
call in class Value
Parameters:
env - the calling environment

call

public Value call(Env env,
                  Value a1,
                  Value a2)
Evaluates the callback with 2 arguments.

Specified by:
call in interface Callable
Overrides:
call in class Value
Parameters:
env - the calling environment

call

public Value call(Env env,
                  Value a1,
                  Value a2,
                  Value a3)
Evaluates the callback with 3 arguments.

Specified by:
call in interface Callable
Overrides:
call in class Value
Parameters:
env - the calling environment

call

public Value call(Env env,
                  Value a1,
                  Value a2,
                  Value a3,
                  Value a4)
Evaluates the callback with 3 arguments.

Specified by:
call in interface Callable
Overrides:
call in class Value
Parameters:
env - the calling environment

call

public Value call(Env env,
                  Value a1,
                  Value a2,
                  Value a3,
                  Value a4,
                  Value a5)
Evaluates the callback with 3 arguments.

Specified by:
call in interface Callable
Overrides:
call in class Value
Parameters:
env - the calling environment

call

public Value call(Env env,
                  Value[] args)
Description copied from class: Callback
Evaluates the callback with variable arguments.

Specified by:
call in interface Callable
Specified by:
call in class Callback
Parameters:
env - the calling environment

getCallbackName

public java.lang.String getCallbackName()
Description copied from class: Callback
Returns the name of the callback.

Specified by:
getCallbackName in interface Callable
Specified by:
getCallbackName in class Callback

getFunction

public AbstractFunction getFunction(Env env)

isInternal

public boolean isInternal(Env env)
Description copied from class: Callback
Returns true if this callback is implemented internally (i.e. in Java).

Specified by:
isInternal in class Callback

varExport

public void varExport(java.lang.StringBuilder sb)
Exports the value.

Overrides:
varExport in class Value

toString

public java.lang.String toString()
Overrides:
toString in class Callback