1 4 package org.oddjob.scheduling; 5 6 import java.util.ArrayList ; 7 import java.util.List ; 8 9 import org.oddjob.arooa.ArooaHandler; 10 import org.oddjob.arooa.ArooaContext; 11 12 17 public class ScheduleInstructionListType { 18 19 24 private final transient List values = new ArrayList (); 25 26 31 public void addConfiguredValue(Object type) { 32 values.add(type); 33 } 34 35 public Object valueFor(Class required) 36 throws ClassCastException , NumberFormatException { 37 return (ScheduleInstruction[]) values 38 .toArray(new ScheduleInstruction[0]); 39 } 40 41 42 public String toString() { 43 return "List of " + values.size() + " things."; 44 } 45 46 52 public ArooaHandler handlerFor(ArooaContext context) { 53 return ScheduleInstructionFactory.handlerFor(context); 54 } 55 56 } 57 | Popular Tags |