pnuts.ext
Class ScriptPackage.Function
java.lang.Object
|
+--pnuts.lang.PnutsFunction
|
+--pnuts.ext.ScriptPackage.Function
- Enclosing class:
- ScriptPackage
- public static class ScriptPackage.Function
- extends PnutsFunction
- implements AbstractData
Defines a special function to create script packages.
- See Also:
- Serialized Form
Fields inherited from class pnuts.lang.PnutsFunction |
CATCH,
CLASS,
DEFINED,
EVAL,
GET_CONTEXT,
IMPORT,
LOAD,
LOAD_FILE,
PACKAGE,
pkg,
primitives,
QUIT,
REQUIRE,
THROW,
USE |
Method Summary |
protected java.lang.Object |
exec(java.lang.Object[] args,
Context context)
Creates a script package. |
java.lang.Object |
get(java.lang.String name,
Context context)
This method defines the behavior of the following expression. |
java.lang.String |
getName()
|
java.lang.Object |
invoke(java.lang.String name,
java.lang.Object[] args,
Context context)
Provides these methods:
|
void |
set(java.lang.String name,
java.lang.Object value,
Context context)
Do nothing. |
Methods inherited from class pnuts.lang.PnutsFunction |
accept,
added,
autoload,
autoload,
call,
call,
call,
call,
call,
defined,
elements,
get,
getImportEnv,
getPackage,
getPackage,
isBuiltin,
put,
toString,
unparse |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ScriptPackage.Function
public ScriptPackage.Function()
ScriptPackage.Function
public ScriptPackage.Function(java.lang.String name)
getName
public java.lang.String getName()
- Overrides:
- getName in class PnutsFunction
- Tags copied from class: PnutsFunction
- Returns:
- the name of functions
get
public java.lang.Object get(java.lang.String name,
Context context)
- Description copied from interface: Property
- This method defines the behavior of the following expression.
aProperty . name
- Returns:
- null
set
public void set(java.lang.String name,
java.lang.Object value,
Context context)
- Do nothing.
- Tags copied from interface: Property
- Parameters:
name
- the name.value
- the value.context
- the context in which the expression is evaluated.
invoke
public java.lang.Object invoke(java.lang.String name,
java.lang.Object[] args,
Context context)
- Provides these methods:
$.set(pkg, "name", value)
$.get(pkg, "name")
$.defined(pkg, "name")
$.clear(pkg, "name")
$.keys(pkg)
- Specified by:
- invoke in interface AbstractData
exec
protected java.lang.Object exec(java.lang.Object[] args,
Context context)
- Creates a script package.
- Overrides:
- exec in class PnutsFunction
- Tags copied from class: PnutsFunction
- Returns:
- the result of the call