org.appcelerator.kroll
Interface KrollFunction


public interface KrollFunction

An interface that exposes a Javascript function to Java.


Method Summary
 Object call(org.appcelerator.kroll.KrollObject krollObject, HashMap args)
          Executes a function synchronously.
 Object call(org.appcelerator.kroll.KrollObject krollObject, Object[] args)
          Executes a function synchronously.
 void callAsync(org.appcelerator.kroll.KrollObject krollObject, HashMap args)
          Executes a function asynchronously.
 void callAsync(org.appcelerator.kroll.KrollObject krollObject, Object[] args)
          Executes a function asynchronously.
 

Method Detail

call

Object call(org.appcelerator.kroll.KrollObject krollObject,
            HashMap args)
Executes a function synchronously. The result of call is the result of the Javascript function.

Parameters:
krollObject - The object that represents this in Javascript.
args - A single object argument for the function (for convenience)
Returns:
the result of the executed function.

call

Object call(org.appcelerator.kroll.KrollObject krollObject,
            Object[] args)
Executes a function synchronously. The result of call is the result of the Javascript function.

Parameters:
krollObject - The object that represents this in Javascript.
args - the function's arguments.
Returns:
the result of the executed function.

callAsync

void callAsync(org.appcelerator.kroll.KrollObject krollObject,
               HashMap args)
Executes a function asynchronously.

Parameters:
krollObject - The object that represents this in Javascript.
args - A single object argument for the function (for convenience)

callAsync

void callAsync(org.appcelerator.kroll.KrollObject krollObject,
               Object[] args)
Executes a function asynchronously.

Parameters:
krollObject - The object that represents this in Javascript.
args - the function's arguments.


Copyright © 2010-2012 Appcelerator, Inc. Licensed under the Apache License 2.0