org.openscience.cdk.interfaces
Interface IChemObjectBuilder

All Known Implementing Classes:
DebugChemObjectBuilder, DefaultChemObjectBuilder, SilentChemObjectBuilder

public interface IChemObjectBuilder

A helper class to instantiate a ICDKObject instance for a specific implementation.

Author:
egonw
Belongs to CDK module:
interfaces
Source code:
cdk-1.4.x

Method Summary
<T extends ICDKObject>
T
newInstance(Class<T> clazz, Object... params)
          Creates a new instance of an ICDKObject, using the constructor defined by the given parameters.
 

Method Detail

newInstance

<T extends ICDKObject> T newInstance(Class<T> clazz,
                                     Object... params)
                                 throws IllegalArgumentException
Creates a new instance of an ICDKObject, using the constructor defined by the given parameters.

Type Parameters:
T - Class of an interface extending ICDKObject or ICDKObject itself.
Parameters:
clazz - Interface class to instantiate an instance for.
params - Parameters passed to the constructor of the created instance.
Returns:
Instance created.
Throws:
IllegalArgumentException - Exception thrown when the IChemObjectBuilder builder cannot instantiate the clazz with the given parameters.