/** * Gets a Transformer that invokes a method on the input object. * The method must have no parameters. If the input object is null, * null is returned. * <p> * For example, <code>TransformerUtils.invokerTransformer("getName");</code> * will call the <code>getName/code> method on the input object to * determine the transformer result. * * @see org.apache.commons.collections.functors.InvokerTransformer * * @param methodName the method name to call on the input object, may not be null * @return the transformer * @throws IllegalArgumentException if the methodName is null. */ public static Transformer invokerTransformer(String methodName){ return InvokerTransformer.getInstance(methodName, null, null); }
/** * Gets a Transformer that invokes a method on the input object. * The method parameters are specified. If the input object is null, * null is returned. * * @see org.apache.commons.collections.functors.InvokerTransformer * * @param methodName the name of the method * @param paramTypes the parameter types * @param args the arguments * @return the transformer * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Transformer invokerTransformer(String methodName, Class[] paramTypes, Object[] args){ return InvokerTransformer.getInstance(methodName, paramTypes, args); }
/** * Gets a Transformer that invokes a method on the input object. * The method parameters are specified. If the input object is null, * null is returned. * * @see org.apache.commons.collections.functors.InvokerTransformer * * @param methodName the name of the method * @param paramTypes the parameter types * @param args the arguments * @return the transformer * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Transformer invokerTransformer(String methodName, Class[] paramTypes, Object[] args){ return InvokerTransformer.getInstance(methodName, paramTypes, args); }
/** * Gets a Transformer that invokes a method on the input object. * The method must have no parameters. If the input object is null, * null is returned. * <p> * For example, <code>TransformerUtils.invokerTransformer("getName");</code> * will call the <code>getName/code> method on the input object to * determine the transformer result. * * @see org.apache.commons.collections.functors.InvokerTransformer * * @param methodName the method name to call on the input object, may not be null * @return the transformer * @throws IllegalArgumentException if the methodName is null. */ public static Transformer invokerTransformer(String methodName){ return InvokerTransformer.getInstance(methodName, null, null); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null */ public static Closure invokerClosure(String methodName) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @param paramTypes the parameter types * @param args the arguments * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Closure invokerClosure(String methodName, Class[] paramTypes, Object[] args) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName, paramTypes, args)); }
/** * Creates a Predicate that invokes a method on the input object. * The method must return either a boolean or a non-null Boolean, * and have no parameters. If the input object is null, a * PredicateException is thrown. * <p> * For example, <code>PredicateUtils.invokerPredicate("isEmpty");</code> * will call the <code>isEmpty</code> method on the input object to * determine the predicate result. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerPredicate * * @param methodName the method name to call on the input object, may not be null * @return the predicate * @throws IllegalArgumentException if the methodName is null. */ public static Predicate invokerPredicate(String methodName){ // reuse transformer as it has caching - this is lazy really, should have inner class here return asPredicate(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null */ public static Closure invokerClosure(String methodName) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @param paramTypes the parameter types * @param args the arguments * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Closure invokerClosure(String methodName, Class[] paramTypes, Object[] args) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName, paramTypes, args)); }
/** * Creates a Predicate that invokes a method on the input object. * The method must return either a boolean or a non-null Boolean, * and have no parameters. If the input object is null, a * PredicateException is thrown. * <p> * For example, <code>PredicateUtils.invokerPredicate("isEmpty");</code> * will call the <code>isEmpty</code> method on the input object to * determine the predicate result. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerPredicate * * @param methodName the method name to call on the input object, may not be null * @return the predicate * @throws IllegalArgumentException if the methodName is null. */ public static Predicate invokerPredicate(String methodName){ // reuse transformer as it has caching - this is lazy really, should have inner class here return asPredicate(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Predicate that invokes a method on the input object. * The method must return either a boolean or a non-null Boolean, * and have no parameters. If the input object is null, a * PredicateException is thrown. * <p> * For example, <code>PredicateUtils.invokerPredicate("isEmpty");</code> * will call the <code>isEmpty</code> method on the input object to * determine the predicate result. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerPredicate * * @param methodName the method name to call on the input object, may not be null * @param paramTypes the parameter types * @param args the arguments * @return the predicate * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Predicate invokerPredicate(String methodName, Class[] paramTypes, Object[] args){ // reuse transformer as it has caching - this is lazy really, should have inner class here return asPredicate(InvokerTransformer.getInstance(methodName, paramTypes, args)); }
/** * Creates a Predicate that invokes a method on the input object. * The method must return either a boolean or a non-null Boolean, * and have no parameters. If the input object is null, a * PredicateException is thrown. * <p> * For example, <code>PredicateUtils.invokerPredicate("isEmpty");</code> * will call the <code>isEmpty</code> method on the input object to * determine the predicate result. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerPredicate * * @param methodName the method name to call on the input object, may not be null * @param paramTypes the parameter types * @param args the arguments * @return the predicate * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Predicate invokerPredicate(String methodName, Class[] paramTypes, Object[] args){ // reuse transformer as it has caching - this is lazy really, should have inner class here return asPredicate(InvokerTransformer.getInstance(methodName, paramTypes, args)); }
/** * Gets a Transformer that invokes a method on the input object. * The method parameters are specified. If the input object is null, * null is returned. * * @see org.apache.commons.collections.functors.InvokerTransformer * * @param methodName the name of the method * @param paramTypes the parameter types * @param args the arguments * @return the transformer * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Transformer invokerTransformer(String methodName, Class[] paramTypes, Object[] args){ return InvokerTransformer.getInstance(methodName, paramTypes, args); }
/** * Gets a Transformer that invokes a method on the input object. * The method must have no parameters. If the input object is null, * null is returned. * <p> * For example, <code>TransformerUtils.invokerTransformer("getName");</code> * will call the <code>getName/code> method on the input object to * determine the transformer result. * * @see org.apache.commons.collections.functors.InvokerTransformer * * @param methodName the method name to call on the input object, may not be null * @return the transformer * @throws IllegalArgumentException if the methodName is null. */ public static Transformer invokerTransformer(String methodName){ return InvokerTransformer.getInstance(methodName, null, null); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null */ public static Closure invokerClosure(String methodName) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null */ public static Closure invokerClosure(String methodName) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null */ public static Closure invokerClosure(String methodName) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null */ public static Closure invokerClosure(String methodName) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null */ public static Closure invokerClosure(String methodName) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName)); }
/** * Creates a Closure that will invoke a specific method on the closure's * input object by reflection. * * @see org.apache.commons.collections.functors.InvokerTransformer * @see org.apache.commons.collections.functors.TransformerClosure * * @param methodName the name of the method * @param paramTypes the parameter types * @param args the arguments * @return the <code>invoker</code> closure * @throws IllegalArgumentException if the method name is null * @throws IllegalArgumentException if the paramTypes and args don't match */ public static Closure invokerClosure(String methodName, Class[] paramTypes, Object[] args) { // reuse transformer as it has caching - this is lazy really, should have inner class here return asClosure(InvokerTransformer.getInstance(methodName, paramTypes, args)); }