org.biojavax
Interface RichObjectBuilder

All Known Implementing Classes:
BioSQLRichObjectBuilder, SimpleRichObjectBuilder

public interface RichObjectBuilder

This interface allows a class to generate Rich objects based on a class name and some parameters. The idea is to allow maintenance of a singleton map.

Since:
1.5
Author:
Richard Holland

Method Summary
 Object buildObject(Class clazz, List paramsList)
          This method takes a class name and some parameters, and uses that information to construct and return an equivalent object, usually by calling the constructor on the class with the supplied parameters.
 

Method Detail

buildObject

Object buildObject(Class clazz,
                   List paramsList)
This method takes a class name and some parameters, and uses that information to construct and return an equivalent object, usually by calling the constructor on the class with the supplied parameters. Note that it only works with classes whose constructors take only Objects, and not primitives. It should return singletons.

Parameters:
clazz - the class to instantiate and build
paramsList - the parameters to pass to the constructor
Returns:
an instance of the requested class/params combination. May or may not be a singleton, but usually will be given as that is the purpose of this class.