|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmurlen.util.fscript.BasicExtension
This class implements a bare FSExtension - subclassing from this will help prevent errors caused by not throwing FSUnsupportedException from empty set/getVar and callFunction methods.
Copyright (C) 2000 murlen.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
Constructor Summary | |
BasicExtension()
|
Method Summary | |
java.lang.Object |
callFunction(java.lang.String name,
java.util.ArrayList params)
callFunction is called whenever a function call is made in FScript to a function not defined withing hte script itself |
java.lang.Object |
getVar(java.lang.String name)
getVar is called whenever a variable is read in FScript that has not been defined within the script iteslf |
java.lang.Object |
getVar(java.lang.String name,
java.lang.Object index)
getVar is called whenever a variable is read in FScript that has not been defined within the script iteslf |
void |
setVar(java.lang.String name,
java.lang.Object value)
setVar is called whenever a variable is written to in FScript that has not been defined within the script itself |
void |
setVar(java.lang.String name,
java.lang.Object index,
java.lang.Object value)
setVar is called whenever a variable is written to in FScript that has not been defined within the script itself |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicExtension()
Method Detail |
public java.lang.Object callFunction(java.lang.String name, java.util.ArrayList params) throws FSException
FSFunctionExtension
callFunction is called whenever a function call is made in FScript to a function not defined withing hte script itself
callFunction
in interface FSFunctionExtension
name
- the name of the functionparams
- an array list of parameters passed to the function
FSException
public java.lang.Object getVar(java.lang.String name) throws FSException
FSVarExtension
getVar is called whenever a variable is read in FScript that has not been defined within the script iteslf
getVar
in interface FSVarExtension
name
- the variable name
FSException
public void setVar(java.lang.String name, java.lang.Object value) throws FSException
FSVarExtension
setVar is called whenever a variable is written to in FScript that has not been defined within the script itself
setVar
in interface FSVarExtension
name
- the variable namevalue
- the value to assign to the variable
FSException
public java.lang.Object getVar(java.lang.String name, java.lang.Object index) throws FSException
FSArrayExtension
getVar is called whenever a variable is read in FScript that has not been defined within the script iteslf
This version allows an index variable to be supplied for array like access
getVar
in interface FSArrayExtension
name
- the variable nameindex
- the index
FSException
public void setVar(java.lang.String name, java.lang.Object index, java.lang.Object value) throws FSException
FSArrayExtension
setVar is called whenever a variable is written to in FScript that has not been defined within the script itself
This version allows an index variable to be supplied for array like access
setVar
in interface FSArrayExtension
name
- the variable nameindex
- the indexvalue
- the value to assign to the variable
FSException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |