public class DebugChemObjectBuilder extends Object implements IChemObjectBuilder
IChemObject for the original CDK
implementation. The factory create debug objects which will log their
behaviour when used.
IChemObjectBuilder builder = DebugChemObjectBuilder.getInstance();
IAtom a = builder.newInstance(IAtom.class);
IAtom c12 = builder.newInstance(IAtom.class, "C");
IAtom c13 = builder.newInstance(IAtom.class,
builder.newInstance(IIsotope.class,
"C", 13));
| Modifier and Type | Method and Description |
|---|---|
static IChemObjectBuilder |
getInstance()
Access the singleton instance of this DebugChemObjectBuilder.
|
IAtom |
newAtom()
Create a new atom using the default constructor.
|
IAtomContainer |
newAtomContainer()
Create a new atom container using the default constructor.
|
IBond |
newBond()
Create a new bond using the default constructor.
|
<T extends ICDKObject> |
newInstance(Class<T> clazz,
Object... params)
Creates a new instance of an
ICDKObject, using the constructor defined by the
given parameters. |
public static IChemObjectBuilder getInstance()
// get the builder instance
IChemObjectBuilder builder = DebugChemObjectBuilder.getInstance();
// using the builder...
// create an IAtom using the default constructor
IAtom atom = builder.newInstance(IAtom.class);
// create a carbon atom
IAtom c1 = builder.newInstance(IAtom.class, "C");
public <T extends ICDKObject> T newInstance(Class<T> clazz, Object... params)
ICDKObject, using the constructor defined by the
given parameters.newInstance in interface IChemObjectBuilderT - Class of an interface extending ICDKObject or ICDKObject
itself.clazz - Interface class to instantiate an instance for.params - Parameters passed to the constructor of the created instance.public IAtom newAtom()
newInstance(IAtom.class) and should be used for
high throughput applications (e.g. IO).newAtom in interface IChemObjectBuilderpublic IBond newBond()
newInstance(IAtom.class) and should be used for
high throughput applications (e.g. IO).newBond in interface IChemObjectBuilderpublic IAtomContainer newAtomContainer()
newInstance(IAtom.class) and should be used for
high throughput applications (e.g. IO).newAtomContainer in interface IChemObjectBuilderCopyright © 2021. All rights reserved.