com.gridsystems.utils
Class ClassFinder

java.lang.Object
  extended by com.gridsystems.utils.ClassFinder

public class ClassFinder
extends java.lang.Object

Type description.

Version:
1.0
Author:
Rodrigo Ruiz

Constructor Summary
ClassFinder(java.lang.Class<?> iface)
          Creates a new instance.
 
Method Summary
 java.lang.Object[] createInstances()
          Gets an array of instances of all discovered classes, that can be instantiated using a default unary constructor.
 void findClasses(java.lang.String resourceName)
          Gets the list of classes discovered through resource discovery.
 java.lang.Class<?>[] getClasses()
          Gets an array of all discovered classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFinder

public ClassFinder(java.lang.Class<?> iface)
Creates a new instance.

Parameters:
iface - The interface all found classes must implement
Method Detail

findClasses

public void findClasses(java.lang.String resourceName)
Gets the list of classes discovered through resource discovery.

Parameters:
resourceName - The name of the resources containing class lists

getClasses

public java.lang.Class<?>[] getClasses()
Gets an array of all discovered classes.

Returns:
An array containing all discovered classes

createInstances

public java.lang.Object[] createInstances()
Gets an array of instances of all discovered classes, that can be instantiated using a default unary constructor.

Returns:
An array of instances of all discovered classes


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.