Imroved Indicator interface, draws two indicators now

This commit is contained in:
2017-11-25 09:28:01 +01:00
parent ff0e8bc4b9
commit f6eab6b6a2
7 changed files with 95 additions and 33 deletions

View File

@ -31,7 +31,7 @@ import org.json.JSONObject;
*
* @author tube
*/
public interface ConfigurableInterface {
public abstract interface ConfigurableInterface {
/**
* Get current configuration as JSON object.

View File

@ -32,15 +32,31 @@ import java.util.ArrayList;
* @author 7u83 <7u83@mail.ru>
* @param <T>
*/
public class IndicatorLoader<T> extends SeSimClassLoader {
public class IndicatorLoader extends SeSimClassLoader<Indicator> {
/**
*
* @param class_type
*
* @param class_type
*/
public IndicatorLoader(Class class_type) {
super(class_type);
public IndicatorLoader(ArrayList<String> path_list) {
super(Indicator.class, path_list);
}
public ArrayList<String> getNames() {
ArrayList<Class<Indicator>> indicators;
indicators = this.getInstalledClasses();
for (Class<Indicator> ic : indicators) {
Indicator i = (Indicator) this.newInstance(ic);
String name = i.getName();
System.out.printf("Name of Indicator: %s", name);
}
return new ArrayList<String>();
}
}