org.apache.camel.util
Class FactoryFinder

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

public class FactoryFinder
extends Object


Constructor Summary
FactoryFinder()
           
FactoryFinder(String path)
           
 
Method Summary
 Class findClass(String key)
           
 Class findClass(String key, String propertyPrefix)
           
 List<Class> findClasses(String key)
           
 List<Class> findClasses(String key, String propertyPrefix)
           
 String getPath()
           
 Object newInstance(String key)
          Creates a new instance of the given key
 Object newInstance(String key, Injector injector)
           
<T> T
newInstance(String key, Injector injector, Class<T> expectedType)
           
 Object newInstance(String key, Injector injector, String propertyPrefix)
           
<T> T
newInstance(String key, Injector injector, String propertyPrefix, Class<T> expectedType)
           
 Object newInstance(String key, String propertyPrefix)
           
<T> List<T>
newInstances(String key, Injector injector, Class<T> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryFinder

public FactoryFinder()

FactoryFinder

public FactoryFinder(String path)
Method Detail

newInstance

public Object newInstance(String key)
                   throws IllegalAccessException,
                          InstantiationException,
                          IOException,
                          ClassNotFoundException
Creates a new instance of the given key

Parameters:
key - is the key to add to the path to find a text file containing the factory name
Returns:
a newly created instance
Throws:
IllegalAccessException
InstantiationException
IOException
ClassNotFoundException

newInstance

public Object newInstance(String key,
                          String propertyPrefix)
                   throws IllegalAccessException,
                          InstantiationException,
                          IOException,
                          ClassNotFoundException
Throws:
IllegalAccessException
InstantiationException
IOException
ClassNotFoundException

newInstance

public Object newInstance(String key,
                          Injector injector)
                   throws IOException,
                          ClassNotFoundException
Throws:
IOException
ClassNotFoundException

newInstance

public Object newInstance(String key,
                          Injector injector,
                          String propertyPrefix)
                   throws IOException,
                          ClassNotFoundException
Throws:
IOException
ClassNotFoundException

newInstance

public <T> T newInstance(String key,
                         Injector injector,
                         Class<T> expectedType)
              throws IOException,
                     ClassNotFoundException
Throws:
IOException
ClassNotFoundException

newInstance

public <T> T newInstance(String key,
                         Injector injector,
                         String propertyPrefix,
                         Class<T> expectedType)
              throws IOException,
                     ClassNotFoundException
Throws:
IOException
ClassNotFoundException

newInstances

public <T> List<T> newInstances(String key,
                                Injector injector,
                                Class<T> type)
                     throws IOException,
                            ClassNotFoundException
Throws:
IOException
ClassNotFoundException

findClass

public Class findClass(String key)
                throws ClassNotFoundException,
                       IOException
Throws:
ClassNotFoundException
IOException

findClass

public Class findClass(String key,
                       String propertyPrefix)
                throws ClassNotFoundException,
                       IOException
Throws:
ClassNotFoundException
IOException

findClasses

public List<Class> findClasses(String key)
                        throws ClassNotFoundException,
                               IOException
Throws:
ClassNotFoundException
IOException

findClasses

public List<Class> findClasses(String key,
                               String propertyPrefix)
                        throws ClassNotFoundException,
                               IOException
Throws:
ClassNotFoundException
IOException

getPath

public String getPath()


Copyright © 2008 IONA Open Source Community. All Rights Reserved.