* @param phaseLast
* @throws PhaseException
*/
public void setPhaseLast(Handler phaseLast) throws PhaseException {
if (phaselastset) {
throw new PhaseException("PhaseLast already has been set,"
+ " cannot have two PhaseLast Handler for same phase "
+ this.getPhaseName());
}
if (handlers.size() == 0) {
handlers.add(phaseLast);
} else {
handlers.add(handlers.size() - 1, phaseLast);
}
phaselastset = true;
// TODO: Move this check to where we read the rules
if (getBeforeAfter(phaseLast) != ANYWHERE) {
throw new PhaseException("Handler with PhaseLast property "
+ "can not have any before or after property error in "
+ phaseLast.getName());
}
}