blob: 801975449bb19e5af9d5549695641d92c00d96f7 [file] [log] [blame]
// Copyright 2005 Google Inc.
// All Rights Reserved.
#ifndef FUNC_WRAPPER_H
#define FUNC_WRAPPER_H
#include "FunctionObject.h"
#include <jni.h>
// This class actually wraps Java method objects
class FuncWrapper : public FunctionObject {
public:
// funcObj MUST be a global ref
FuncWrapper(const KJS::UString& name, jobject funcObj);
virtual ~FuncWrapper();
jobject getFuncObj();
public:
virtual KJS::JSValue *callAsFunction(KJS::ExecState*, KJS::JSObject*, const KJS::List&);
private:
jobject funcObj;
};
inline jobject FuncWrapper::getFuncObj() {
return funcObj;
}
#endif