All Packages Class Hierarchy This Package Previous Next Index
Class pnuts.lang.PnutsFunction
pnuts.lang.PnutsFunction
- public class PnutsFunction
A PnutsFunction represents a Pnuts function group with a same name.
-
PnutsFunction()
-
-
PnutsFunction(String)
-
-
autoload(String, String)
- register "name" as an autoloaded function.
-
call(Object[])
- call a function with arguments "args"
-
call(Object[], Context)
- call a function in "context" with arguments "args"
-
call(String, Object[])
- call a function "name" with arguments "args"
-
call(String, Object[], Context)
- call a function "name" in "context" with arguments "args"
-
call(String, Object[], String)
- call a function "pkg::name" with arguments "args"
-
callSafely(String, Object[])
- call a function "name" with arguments "args"
When "name" is not a function do nothing.
-
defined(int)
-
-
getId()
-
-
getName()
-
-
toString()
-
PnutsFunction
protected PnutsFunction()
PnutsFunction
protected PnutsFunction(String name)
autoload
public static void autoload(String name,
String file)
- register "name" as an autoloaded function.
Later "file" is automatically loaded if the function is not defined
defined
public boolean defined(int narg)
- Returns:
- true if a function with narg, otherwise false
getId
public String getId()
- Returns:
- the unique name
getName
public String getName()
- Returns:
- the name of functions
call
public Object call(Object args[],
Context context)
- call a function in "context" with arguments "args"
- Returns:
- the result of the call
call
public Object call(Object args[])
- call a function with arguments "args"
- Returns:
- the result of the call
toString
public String toString()
call
public static Object call(String name,
Object args[],
String pkg)
- call a function "pkg::name" with arguments "args"
call
public static Object call(String name,
Object args[],
Context context)
- call a function "name" in "context" with arguments "args"
call
public static Object call(String name,
Object args[])
- call a function "name" with arguments "args"
callSafely
public static Object callSafely(String name,
Object args[])
- call a function "name" with arguments "args"
When "name" is not a function do nothing.
All Packages Class Hierarchy This Package Previous Next Index