org.apache.hivemind.util
Class InstanceCreationUtils

java.lang.Object
  extended by org.apache.hivemind.util.InstanceCreationUtils

public class InstanceCreationUtils
extends java.lang.Object

Code for creating an instance, possibly setting its Location, and possibly initializing its properties.

Since:
1.1
Author:
Howard M. Lewis Ship

Constructor Summary
InstanceCreationUtils()
           
 
Method Summary
static java.lang.Object createInstance(Module module, java.lang.String initializer, Location location)
          Creates an instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceCreationUtils

public InstanceCreationUtils()
Method Detail

createInstance

public static java.lang.Object createInstance(Module module,
                                              java.lang.String initializer,
                                              Location location)
Creates an instance.

Parameters:
module - the referencing module, used to resolve partial class names
initializer - The name of the class to instantiate, possibly followed by a list of properties and values. I.e. com.examples.MyBean,property=value.
location - The location to assign to the newly created instance, if it implements LocationHolder. Also the location used to report errors creating or configuring the instance.


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.