Logo Search packages:      
Sourcecode: cdk version File versions  Download package

DebugElement.java

/* $Revision$ $Author$ $Date$
 *
 * Copyright (C) 2005-2007  Egon Willighagen <egonw@users.sf.net>
 *
 * Contact: cdk-devel@lists.sourceforge.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package org.openscience.cdk.debug;

import java.util.Map;

import org.openscience.cdk.Element;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.interfaces.IChemObjectChangeEvent;
import org.openscience.cdk.interfaces.IChemObjectListener;
import org.openscience.cdk.interfaces.IElement;
import org.openscience.cdk.tools.LoggingTool;

/**
 * Debugging data class.
 * 
 * @author     egonw
 * @cdk.module datadebug
 * @cdk.githash
 */
00039 public class DebugElement extends Element
    implements IElement {

00042     private static final long serialVersionUID = -8520499563841667066L;
    
    LoggingTool logger = new LoggingTool(DebugElement.class);

      public DebugElement() {
            super();
            logger.debug("Instantiated a DebugElement");
      }
      
      public DebugElement(String symbol) {
            super(symbol);
            logger.debug("Instantiated a DebugElement: symbol= ", symbol);
      }
      
      public DebugElement(String symbol, int atomicNumber) {
            super(symbol, atomicNumber);
            logger.debug("Instantiated a DebugElement: symbol= ", symbol + " atomic number= " + atomicNumber);
      }
      
      public DebugElement(IElement element) {
            super(element);
            logger.debug("Instantiated a DebugElement: element= ", element);
      }

00066       public Integer getAtomicNumber() {
            logger.debug("Getting atomic number: ", super.getAtomicNumber());
            return super.getAtomicNumber();
      }

00071       public void setAtomicNumber(Integer atomicNumber) {
            logger.debug("Setting atomic number: ", atomicNumber);
            super.setAtomicNumber(atomicNumber);
      }

00076       public String getSymbol() {
            logger.debug("Getting symbol: ", super.getSymbol());
            return super.getSymbol();
      }

00081       public void setSymbol(String symbol) {
            logger.debug("Setting symbol: ", symbol);
            super.setSymbol(symbol);
      }

00086       public void addListener(IChemObjectListener col) {
            logger.debug("Adding listener: ", col);
            super.addListener(col);
      }

00091       public int getListenerCount() {
            logger.debug("Getting listener count: ", super.getListenerCount());
            return super.getListenerCount();
      }

00096       public void removeListener(IChemObjectListener col) {
            logger.debug("Removing listener: ", col);
            super.removeListener(col);
      }

00101       public void notifyChanged() {
            logger.debug("Notifying changed");
            super.notifyChanged();
      }

00106       public void notifyChanged(IChemObjectChangeEvent evt) {
            logger.debug("Notifying changed event: ", evt);
            super.notifyChanged(evt);
      }

00111       public void setProperty(Object description, Object property) {
            logger.debug("Setting property: ", description + "=" + property);
            super.setProperty(description, property);
      }

00116       public void removeProperty(Object description) {
            logger.debug("Removing property: ", description);
            super.removeProperty(description);
      }

00121       public Object getProperty(Object description) {
            logger.debug("Getting property: ", description + "=" + super.getProperty(description));
            return super.getProperty(description);
      }

00126       public Map<Object,Object> getProperties() {
            logger.debug("Getting properties");
            return super.getProperties();
      }

00131       public String getID() {
            logger.debug("Getting ID: ", super.getID());
            return super.getID();
      }

00136       public void setID(String identifier) {
            logger.debug("Setting ID: ", identifier);
            super.setID(identifier);
      }

00141       public void setFlag(int flag_type, boolean flag_value) {
            logger.debug("Setting flag: ", flag_type + "=" + flag_value);
            super.setFlag(flag_type, flag_value);
      }

00146       public boolean getFlag(int flag_type) {
            logger.debug("Setting flag: ", flag_type + "=" + super.getFlag(flag_type));
            return super.getFlag(flag_type);
      }

00151       public void setProperties(Map<Object,Object> properties) {
            logger.debug("Setting properties: ", properties);
            super.setProperties(properties);
      }

00156       public void setFlags(boolean[] flagsNew) {
            logger.debug("Setting flags:", flagsNew.length);
            super.setFlags(flagsNew);
      }

00161       public boolean[] getFlags() {
            logger.debug("Getting flags:", super.getFlags().length);
            return super.getFlags();
      }

00166       public Object clone() throws CloneNotSupportedException {
        Object clone = null;
        try {
            clone = super.clone();
        } catch (Exception exception) {
            logger.error("Could not clone DebugAtom: " + exception.getMessage(), exception);
            logger.debug(exception);
        }
        return clone;
      }

00177       public IChemObjectBuilder getBuilder() {
            return DebugChemObjectBuilder.getInstance();
      }

}

Generated by  Doxygen 1.6.0   Back to index