if(cls.getCanonicalName() == "experimentalcode.elke.AlgorithmTest") {
continue;
}
UnParameterization config = new UnParameterization();
final TrackParameters track = new TrackParameters(config);
// LoggingUtil.warning("Instantiating " + cls.getName());
FutureTask<?> instantiator = new FutureTask<Object>(new Runnable() {
@Override
public void run() {
// Try a V3 style parameterizer first.
Parameterizer par = ClassGenericsUtil.getParameterizer(cls);
if(par != null) {
par.configure(track);
}
else {
try {
ClassGenericsUtil.tryInstantiate(Object.class, cls, track);
}
catch(java.lang.NoSuchMethodException e) {
logger.warning("Could not instantiate class " + cls.getName() + " - no appropriate constructor or parameterizer found.");
}
catch(java.lang.reflect.InvocationTargetException e) {
if(e.getCause() instanceof RuntimeException) {
throw (RuntimeException) e.getCause();
}
if(e.getCause() instanceof Error) {
throw (Error) e.getCause();
}
throw new RuntimeException(e.getCause());
}
catch(RuntimeException e) {
throw e;
}
catch(Exception e) {
throw new RuntimeException(e);
}
catch(java.lang.Error e) {
throw new RuntimeException(e);
}
}
for(Pair<Object, Parameter<?, ?>> pair : track.getAllParameters()) {
if(pair.first == null) {
pair.first = cls;
}
options.add(pair);
}