net.sourceforge.mp3dings.filter
Class BeanShellFilter
java.lang.Object
net.sourceforge.mp3dings.utils.Bean
net.sourceforge.mp3dings.filter.FilterBean
net.sourceforge.mp3dings.filter.BeanShellFilter
- All Implemented Interfaces:
- Serializable, Filter
public class BeanShellFilter
- extends FilterBean
A filter that is based on a bean-shell script.
- Version:
- $Revision: 67 $ ($Date: 2007-10-23 10:45:08 +0200 (Di, 23 Okt 2007) $)
- Author:
- Moritz Ringler
- See Also:
- Serialized Form
| Methods inherited from class net.sourceforge.mp3dings.utils.Bean |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getConstraints, getId, getName, getPropertyChangeListeners, getPropertyChangeListeners, load, load, removePropertyChangeListener, removePropertyChangeListener, save, setId, setName |
BeanShellFilter
public BeanShellFilter()
BeanShellFilter
public BeanShellFilter(String filterMethodBody)
setMethodBody
public void setMethodBody(String filterMethodBody)
getCompileError
public Exception getCompileError()
isSavable
public boolean isSavable()
- Overrides:
isSavable in class Bean
save
public void save(Preferences pref,
String key)
- Overrides:
save in class Bean
key - the key under which this bean is to be saved.
This key must be a valid filename, so you should keep it
as simple as possible.
getMethodBody
public String getMethodBody()
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
filter
public Object filter(Object val)
- Filters the Object val.
- Specified by:
filter in interface Filter- Specified by:
filter in class FilterBean
- Parameters:
val - the object to filter
- Returns:
- the filtered object. It must be an instance of the class of val.
Implementations should assure this with an assert statement
such as
assert returnval == null || val == null || val.getClass().isInstance(returnval);