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
Source code:
main
Belongs to CDK module:
interfaces
  • Method Details

    • 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.
    • newAtom

      IAtom newAtom()
      Create a new atom using the default constructor. This method is considerably faster than the dynamic dispatch of newInstance(IAtom.class) and should be used for high throughput applications (e.g. IO).
      Returns:
      new atom
    • newBond

      IBond newBond()
      Create a new bond using the default constructor. This method is considerably faster than the dynamic dispatch of newInstance(IBond.class) and should be used for high throughput applications (e.g. IO).
      Returns:
      new bond
    • newAtomContainer

      IAtomContainer newAtomContainer()
      Create a new atom container using the default constructor. This method is considerably faster than the dynamic dispatch of newInstance(IAtomContainer.class) and should be used for high throughput applications (e.g. IO).
      Returns:
      the new atom container
    • newReaction

      IReaction newReaction()
      Create a new reaction using the default constructor. This method is considerably faster than the dynamic dispatch of newInstance(IReaction.class) and should be used for high throughput applications (e.g. IO).
      Returns:
      the new reaction