@Override
public List<WorkflowClassInfo> getWorkflows() {
final List<WorkflowClassInfo> resultList = new ArrayList<WorkflowClassInfo>();
final VolatileState localVolatileState = volatileState;
for (Class<?> wfClass : localVolatileState.wfClassMap.values()) {
WorkflowClassInfo wfi = new WorkflowClassInfo();
wfi.setClassname(wfClass.getName());
wfi.setSourceCode(localVolatileState.javaSources.get(wfClass.getName()));
WorkflowDescription wfDesc = wfClass.getAnnotation(WorkflowDescription.class);
if (wfDesc != null) {
wfi.setAlias(wfDesc.alias());
wfi.setMajorVersion(wfDesc.majorVersion());
wfi.setMinorVersion(wfDesc.minorVersion());
wfi.setPatchLevel(wfDesc.patchLevelVersion());
}
resultList.add(wfi);
}
return resultList;
}