1 16 package org.apache.commons.collections.functors; 17 18 import java.io.Serializable ; 19 20 import org.apache.commons.collections.Closure; 21 import org.apache.commons.collections.FunctorException; 22 23 31 public final class ExceptionClosure implements Closure, Serializable { 32 33 34 static final long serialVersionUID = 7179106032121985545L; 35 36 37 38 public static final Closure INSTANCE = new ExceptionClosure(); 39 40 46 public static Closure getInstance() { 47 return INSTANCE; 48 } 49 50 53 private ExceptionClosure() { 54 super(); 55 } 56 57 63 public void execute(Object input) { 64 throw new FunctorException("ExceptionClosure invoked"); 65 } 66 67 } 68 | Popular Tags |