/** * Creates the API operation so it can called multiple times. */ public APIOperationRunner(final OperationalContext context) { this.context = context; // get the APIOperation that this class implements.. List<Class<? extends APIOperation>> apiOps = getInterfaces(this.getClass(), APIOperation.class); // there should be only one.. if (apiOps.size() > 1) { throw new IllegalStateException("Must only implement one operation."); } }
/** * Creates the API operation so it can called multiple times. */ public APIOperationRunner(final OperationalContext context) { this.context = context; // get the APIOperation that this class implements.. List<Class<? extends APIOperation>> apiOps = getInterfaces(this.getClass(), APIOperation.class); // there should be only one.. if (apiOps.size() > 1) { throw new IllegalStateException("Must only implement one operation."); } }
/** * Creates the API operation so it can called multiple times. */ public APIOperationRunner(final OperationalContext context) { _context = context; // get the APIOperation that this class implements.. List<Class<? extends APIOperation>> apiOps = getInterfaces(this .getClass(), APIOperation.class); // there should be only one.. if (apiOps.size() > 1) { final String MSG = "Must only implement one operation."; throw new IllegalStateException(MSG); } }