|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by objects which want to override the method and field access which uses Java introspection by default.
An executable object is considered by the interpreter to consists of properties and methods. The interface defines 3 major functions:
getValue
: gets a value from the object
setValue
: sets a value in the object
method
: calls a method on the object
Method Summary | |
ExecutableIterator |
createIterator()
This method returns an ExecutableIterator object which is used in a foreach statement. |
ExecutableIterator |
createIterator(java.lang.String qualifier)
This method returns an ExecutableIterator object which is used in a foreach statement. |
java.util.Hashtable |
getAttributes()
This method returns the attributes for this object |
java.util.Hashtable |
getInstanceVariables()
This method returns the instance variables for this object |
java.lang.String |
getSource(java.lang.String location)
This method returns the source for a scripted method described by the location |
java.lang.Object |
getValue(java.lang.String field_name,
java.lang.String attrib_name,
ExecutableContext ctxt)
Called to get the value of a field |
java.lang.Object |
getValueAt(java.lang.Object array_index,
java.lang.String attrib_name,
ExecutableContext ctxt)
Called to get the value of an object in this collection |
java.lang.Object |
method(java.lang.String method_name,
java.lang.Object[] arguments,
ExecutableContext ctxt)
Called if a Simkin script calls a method on this object. |
void |
setValue(java.lang.String field_name,
java.lang.String attrib_name,
java.lang.Object value,
ExecutableContext ctxt)
Called to set the value of a field. |
void |
setValueAt(java.lang.Object array_index,
java.lang.String attrib_name,
java.lang.Object value,
ExecutableContext ctxt)
Called to set an object into this collection. |
Method Detail |
public void setValue(java.lang.String field_name, java.lang.String attrib_name, java.lang.Object value, ExecutableContext ctxt) throws java.lang.RuntimeException, FieldNotSupportedException
field_name
- the name of the fieldattrib_name
- the name of the attribute to be set (can be null)value
- the value to be setctxt
- the context the function is called within
java.lang.RuntimeException
- - if there was a problem running the script (such as not having permission to access a field)
FieldNotSupportedException
- - if the field could not be foundpublic void setValueAt(java.lang.Object array_index, java.lang.String attrib_name, java.lang.Object value, ExecutableContext ctxt) throws java.lang.RuntimeException
array_index
- an object whose value indicates the index of the item in the collectionattrib_name
- the name of the attribute to be set (can be null)value
- the value to be setctxt
- the context the function is called within
java.lang.RuntimeException
- - if there was a problem running the scriptpublic java.lang.Object getValue(java.lang.String field_name, java.lang.String attrib_name, ExecutableContext ctxt) throws java.lang.RuntimeException, FieldNotSupportedException
field_name
- the name of the fieldattrib_name
- attribute name (null if no attribute specified)ctxt
- the context the function is called within
java.lang.RuntimeException
- - if there was a problem running the script (such as not having permission to access a field)
FieldNotSupportedException
- - if the field could not be foundpublic java.lang.Object getValueAt(java.lang.Object array_index, java.lang.String attrib_name, ExecutableContext ctxt) throws java.lang.RuntimeException
array_index
- an object whose value indicates the index of the item in the collectionattrib_name
- attribute name (null if no attribute specified)ctxt
- the context the function is called within
java.lang.RuntimeException
- - if there was a problem running the script
FieldNotSupportedException
- - if the field could not be foundpublic java.lang.Object method(java.lang.String method_name, java.lang.Object[] arguments, ExecutableContext ctxt) throws ParseException, java.lang.RuntimeException, MethodNotSupportedException
method_name
- the name of the methodarguments
- an array of arguments passed to the methodctxt
- the context the function is called within
java.lang.RuntimeException
- - if there was a problem running the script (such as divide by zero)
java.lang.NoSuchMethodException
- - if the method could not be found
ParseException
MethodNotSupportedException
public ExecutableIterator createIterator()
public ExecutableIterator createIterator(java.lang.String qualifier)
qualifier
- - a string that can be used to qualify the iteration in any way
public java.lang.String getSource(java.lang.String location)
location
- the location of the method - in the format passed to the execute functions in the Interpreter
public java.util.Hashtable getInstanceVariables()
public java.util.Hashtable getAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |