package org.ocw; //imports in alphabetical order! /** *

This file is a standard template for Java class source * files. Please use this template to format your source code.

* *

Note that the lines with horizontal bars are 72 characters * long. Your code should usually not be longer than that; in * exceptional cases your lines may be 80 characters long, but never * longer.

* *

Please use javadoc-visible comments for all methods public and * private, as well as for instance variables.

* *

The {@link #LOG} variable should be used in a conditional for * logging statements, as in *

 *      if(LOG) {
 *          e.printStackTrace();
 *      }

* *

The {@link #log(java.lang.String)} method provides an easy way * to do lightweight logging; typical usage is *

        log("method name(): Some message")

* *

See, for example, {@link * org.ocw.client.OCWClient} which contains {@link * org.ocw.client.OCWClient#LOG} which is used in {@link * org.ocw.client.OCWClient#getAvailableActions()}.

* * @author Last modified by $Author: murrayg $ * @version $Revision: 1.1.1.1 $
$Date: 2003/07/18 21:44:54 $ * Copyright (C) 2003 openchemworkbench.org. This file is part of OpenChem * Workbench which is free software under the terms of the GNU General Public * License (version 2 or later) as published by the Free Software Foundation. */ public class JavaSourceTemplate { // Static initialization------------------------------------------- /** For debugging. */ private static final boolean LOG = false; // Instance variables---------------------------------------------- // Constructors---------------------------------------------------- // Methods--------------------------------------------------------- /** * Private method for logging, but see the Java Logging API. * * @param l What to print out. */ private void log(String l) { if (LOG) { String fullClassName = this.getClass().getName(); String className = fullClassName.substring(fullClassName.lastIndexOf(".") + 1); System.out.println(className + "." + l); } } // Inner classes--------------------------------------------------- }