org.apache.camel.util
Class ProcessorDefinitionHelper

java.lang.Object
  extended by org.apache.camel.util.ProcessorDefinitionHelper

public final class ProcessorDefinitionHelper
extends Object

Helper class for ProcessorType and the other model classes.


Method Summary
static
<T> Iterator<T>
filterTypeInOutputs(List<ProcessorDefinition> outputs, Class<T> type)
          Looks for the given type in the list of outputs and recurring all the children as well.
static
<T> T
findFirstTypeInOutputs(List<ProcessorDefinition> outputs, Class<T> type)
          Looks for the given type in the list of outputs and recurring all the children as well.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

filterTypeInOutputs

public static <T> Iterator<T> filterTypeInOutputs(List<ProcessorDefinition> outputs,
                                                  Class<T> type)
Looks for the given type in the list of outputs and recurring all the children as well.

Parameters:
outputs - list of outputs, can be null or empty.
type - the type to look for
Returns:
the found definitions, or null if not found

findFirstTypeInOutputs

public static <T> T findFirstTypeInOutputs(List<ProcessorDefinition> outputs,
                                           Class<T> type)
Looks for the given type in the list of outputs and recurring all the children as well. Will stop at first found and return it.

Parameters:
outputs - list of outputs, can be null or empty.
type - the type to look for
Returns:
the first found type, or null if not found


Copyright © 2009 Apache Software Foundation. All Rights Reserved.