org.apache.hivemind.util
Class ConstructorUtils

java.lang.Object
  |
  +--org.apache.hivemind.util.ConstructorUtils

public class ConstructorUtils
extends java.lang.Object

Static methods for invoking constructors.

Author:
Howard Lewis Ship

Method Summary
static java.lang.Object invokeConstructor(java.lang.Class targetClass, java.lang.Object[] parameters)
          Searches for a constructor matching against the provided arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invokeConstructor

public static java.lang.Object invokeConstructor(java.lang.Class targetClass,
                                                 java.lang.Object[] parameters)
Searches for a constructor matching against the provided arguments.

Parameters:
targetClass - the class to be instantiated
parameters - the parameters to pass to the constructor (may be null or empty)
Returns:
the new instance
Throws:
ApplicationRuntimeException - on any failure