org.apache.commons.collections.FunctorException Java Examples
The following examples show how to use
org.apache.commons.collections.FunctorException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PluginPropertyHandler.java From hop with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @throws IllegalArgumentException if property is null. * @throws FunctorException if HopException in handle thrown. * @see org.apache.commons.collections.Closure#execute(java.lang.Object) */ public final void execute( final Object property ) throws IllegalArgumentException, FunctorException { Assert.assertNotNull( property, "Plugin property cannot be null" ); try { this.handle( (IPluginProperty) property ); } catch ( HopException e ) { throw new FunctorException( "EXCEPTION: " + this, e ); } }
Example #2
Source File: PluginPropertyHandler.java From hop with Apache License 2.0 | 5 votes |
/** * @param properties properties. * @param handler handler. * @throws HopException ... * @throws IllegalArgumentException if properties is null. */ public static void walk( final KeyValueSet properties, final Closure handler ) throws HopException, IllegalArgumentException { assertProperties( properties ); try { properties.walk( handler ); } catch ( FunctorException e ) { throw (HopException) e.getCause(); } }
Example #3
Source File: TransformerPredicate.java From Penetration_Testing_POC with Apache License 2.0 | 5 votes |
/** * Evaluates the predicate returning the result of the decorated transformer. * * @param object the input object * @return true if decorated transformer returns Boolean.TRUE * @throws FunctorException if the transformer returns an invalid type */ public boolean evaluate(Object object) { Object result = iTransformer.transform(object); if (result instanceof Boolean == false) { throw new FunctorException( "Transformer must return an instanceof Boolean, it was a " + (result == null ? "null object" : result.getClass().getName())); } return ((Boolean) result).booleanValue(); }
Example #4
Source File: NullIsExceptionPredicate.java From Penetration_Testing_POC with Apache License 2.0 | 3 votes |
/** * Evaluates the predicate returning the result of the decorated predicate * once a null check is performed. * * @param object the input object * @return true if decorated predicate returns true * @throws FunctorException if input is null */ public boolean evaluate(Object object) { if (object == null) { throw new FunctorException("Input Object must not be null"); } return iPredicate.evaluate(object); }
Example #5
Source File: PluginPropertyHandler.java From pentaho-kettle with Apache License 2.0 | 3 votes |
/** * {@inheritDoc} * * @see org.apache.commons.collections.Closure#execute(java.lang.Object) * @throws IllegalArgumentException * if property is null. * @throws FunctorException * if KettleException in handle thrown. */ public final void execute( final Object property ) throws IllegalArgumentException, FunctorException { Assert.assertNotNull( property, "Plugin property cannot be null" ); try { this.handle( (PluginProperty) property ); } catch ( KettleException e ) { throw new FunctorException( "EXCEPTION: " + this, e ); } }
Example #6
Source File: PluginPropertyHandler.java From pentaho-kettle with Apache License 2.0 | 3 votes |
/** * @param properties * properties. * @param handler * handler. * @throws KettleException * ... * @throws IllegalArgumentException * if properties is null. */ public static void walk( final KeyValueSet properties, final Closure handler ) throws KettleException, IllegalArgumentException { assertProperties( properties ); try { properties.walk( handler ); } catch ( FunctorException e ) { throw (KettleException) e.getCause(); } }
Example #7
Source File: ExceptionFactory.java From Penetration_Testing_POC with Apache License 2.0 | 2 votes |
/** * Always throws an exception. * * @return never * @throws FunctorException always */ public Object create() { throw new FunctorException("ExceptionFactory invoked"); }
Example #8
Source File: ExceptionPredicate.java From Penetration_Testing_POC with Apache License 2.0 | 2 votes |
/** * Evaluates the predicate always throwing an exception. * * @param object the input object * @return never * @throws FunctorException always */ public boolean evaluate(Object object) { throw new FunctorException("ExceptionPredicate invoked"); }
Example #9
Source File: ExceptionClosure.java From Penetration_Testing_POC with Apache License 2.0 | 2 votes |
/** * Always throw an exception. * * @param input the input object * @throws FunctorException always */ public void execute(Object input) { throw new FunctorException("ExceptionClosure invoked"); }
Example #10
Source File: ExceptionTransformer.java From Penetration_Testing_POC with Apache License 2.0 | 2 votes |
/** * Transforms the input to result by cloning it. * * @param input the input object to transform * @return never * @throws FunctorException always */ public Object transform(Object input) { throw new FunctorException("ExceptionTransformer invoked"); }