| java.lang.Object org.mozilla.javascript.JavaAdapter
Inner Class :static class JavaAdapterSignature | |
Method Summary | |
static int | appendMethodSignature(Class[] argTypes, Class returnType, StringBuffer sb) | public static Object | callMethod(ContextFactory factory, Scriptable thisObj, Function f, Object[] args, long argsToWrap) Utility method which dynamically binds a Context to the current thread,
if none already exists. | public static Object | convertResult(Object result, Class c) | public static byte[] | createAdapterCode(ObjToIntMap functionNames, String adapterName, Class superClass, Class[] interfaces, String scriptClassName) | public static Scriptable | createAdapterWrapper(Scriptable obj, Object adapter) | public Object | execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) | static void | generatePushWrappedArgs(ClassFileWriter cfw, Class[] argTypes, int arrayLength) Generates code to wrap Java arguments into Object[].
Non-primitive Java types are left as-is pending conversion
in the helper method. | static void | generateReturnResult(ClassFileWriter cfw, Class retType, boolean callConvertResult) Generates code to convert a wrapped value type to a primitive type. | public static Object | getAdapterSelf(Class adapterClass, Object adapter) | static int[] | getArgsToConvert(Class[] argTypes) | public static Function | getFunction(Scriptable obj, String functionName) | static Method[] | getOverridableMethods(Class c) | public static void | init(Context cx, Scriptable scope, boolean sealed) | static Object | js_createAdapter(Context cx, Scriptable scope, Object[] args) | static Class | loadAdapterClass(String className, byte[] classBytes) | public static Object | readAdapterObject(Scriptable self, ObjectInputStream in) | public static Scriptable | runScript(Script script) | public static void | writeAdapterObject(Object javaObject, ObjectOutputStream out) |
generatePushWrappedArgs | static void generatePushWrappedArgs(ClassFileWriter cfw, Class[] argTypes, int arrayLength)(Code) | | Generates code to wrap Java arguments into Object[].
Non-primitive Java types are left as-is pending conversion
in the helper method. Leaves the array object on the top of the stack.
|
generateReturnResult | static void generateReturnResult(ClassFileWriter cfw, Class retType, boolean callConvertResult)(Code) | | Generates code to convert a wrapped value type to a primitive type.
Handles unwrapping java.lang.Boolean, and java.lang.Number types.
Generates the appropriate RETURN bytecode.
|
getArgsToConvert | static int[] getArgsToConvert(Class[] argTypes)(Code) | | |
loadAdapterClass | static Class loadAdapterClass(String className, byte[] classBytes)(Code) | | |
|
|