org.apache.camel.blueprint
Class PackageScanRouteBuilderFinder

java.lang.Object
  extended by org.apache.camel.blueprint.PackageScanRouteBuilderFinder

public class PackageScanRouteBuilderFinder
extends java.lang.Object

A helper class which will find all RouteBuilder instances on the classpath

Version:
$Revision$

Constructor Summary
PackageScanRouteBuilderFinder(BlueprintCamelContext camelContext, java.lang.String[] packages, java.lang.ClassLoader classLoader, org.apache.camel.spi.PackageScanClassResolver resolver)
           
 
Method Summary
 void appendBuilders(java.util.List<org.apache.camel.RoutesBuilder> list)
          Appends all the RouteBuilder instances that can be found on the classpath
protected  org.apache.camel.RoutesBuilder instantiateBuilder(java.lang.Class type)
           
protected  boolean isValidClass(java.lang.Class type)
          Returns true if the object is non-abstract and supports a zero argument constructor
protected  boolean shouldIgnoreBean(java.lang.Class<?> type)
          Lets ignore beans that are explicitly configured in the Spring XML files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageScanRouteBuilderFinder

public PackageScanRouteBuilderFinder(BlueprintCamelContext camelContext,
                                     java.lang.String[] packages,
                                     java.lang.ClassLoader classLoader,
                                     org.apache.camel.spi.PackageScanClassResolver resolver)
Method Detail

appendBuilders

public void appendBuilders(java.util.List<org.apache.camel.RoutesBuilder> list)
                    throws java.lang.IllegalAccessException,
                           java.lang.InstantiationException
Appends all the RouteBuilder instances that can be found on the classpath

Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException

shouldIgnoreBean

protected boolean shouldIgnoreBean(java.lang.Class<?> type)
Lets ignore beans that are explicitly configured in the Spring XML files


isValidClass

protected boolean isValidClass(java.lang.Class type)
Returns true if the object is non-abstract and supports a zero argument constructor


instantiateBuilder

protected org.apache.camel.RoutesBuilder instantiateBuilder(java.lang.Class type)
                                                     throws java.lang.IllegalAccessException,
                                                            java.lang.InstantiationException
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException


Apache CAMEL