rendered paste bodypublic void execute(ISequence pSequence) {
for (IStep<?> lStep : getSteps()) {
if(lStep instanceof ISequence){
execute(pSequence);
}else{
Class<?> lClass = lStep.getTargetClass();
if( lClass.isInstance(mTarget)){
Object lObject = lClass.cast((IData)mTarget);
lStep.execute((IData)lObject);
}
// How do we get the data?
// We need a cast to the Step class Typevariable.
// try {
// Object lObject = lClass.newInstance();
// if (lObject instanceof IData) { // Not good hard-coded data
// // type.
//
// }
// } catch (InstantiationException e) {
// e.printStackTrace();
// } catch (IllegalAccessException e) {
// e.printStackTrace();
// }
}
}
}