Subversion Repositories pub

Compare Revisions

Ignore whitespace Rev 56 → Rev 61

/pluggablejs/branches/1.1.0build33/src/net/outlyer/plugins/PluginObject.java
26,8 → 26,8
 
// $Id$
 
import java.util.LinkedList;
import java.util.List;
import java.util.HashSet;
import java.util.Set;
 
/**
* Default plugin object, adds a "features" field intended to describe
35,22 → 35,33
* the script has been executed.
*/
public class PluginObject extends BasePluginObject {
public List features;
/**
* Plugins can describe which features they provide by adding
* elements to this field. Possible values are application-specific.
* Default: empty
* @see #properties
*/
public Set<String> features;
 
{
features = new LinkedList();
features = new HashSet<String>();
}
 
/**
* Obtains the number of the current execution
* @return Current execution number
* @see Sandbox#getExecution()
*/
public int execution() {
return getSandbox().getExecution();
}
 
/**
* {@inheritDoc}
*/
@Override public Object clone() throws CloneNotSupportedException {
PluginObject po = (PluginObject) super.clone();
po.features = new LinkedList();
po.features.addAll(this.features);
final PluginObject po = (PluginObject) super.clone();
po.features = new HashSet<String>(this.features);
return po;
}