}
// Loop through all fields to check for outputs
for(Field field : curClass.getFields())
{
Out anno = getAnnotation(field.getAnnotations(), Out.class);
if(anno != null)
{
String name = anno.name();
Object value = null;
try {
value = field.get(moduleObject);
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException("Output field '"+field+"' in module '"+instance.module().source()+"' not accessible. ");
}
outputs.put(name, value);
}
}
// Loop through all methods to check for outputs
for(Method method : curClass.getMethods())
{
Out anno = getAnnotation(method.getAnnotations(), Out.class);
if(anno != null)
{
String name = anno.name();
Object value = null;
try {
value = method.invoke(moduleObject);
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);