All pastes #571880 Raw Edit

cb01

public text v1 · immutable
·published 2007-06-17 11:18 UTC
rendered paste body
public 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();
//			}
			}
			
		}
	}