Changed from old EvAInfo.default logger to proper Logger instances.
This commit is contained in:
Fabian Becker 2012-08-31 09:22:53 +00:00
parent 31dbdfd205
commit cdc8425573
21 changed files with 68 additions and 61 deletions

View File

@ -44,8 +44,6 @@ public class EvAInfo {
public static final String infoTitle = productName+" Information"; public static final String infoTitle = productName+" Information";
public static final String copyrightYear = "2010-2012"; public static final String copyrightYear = "2010-2012";
public static final String defaultLogger = "eva2";
////////////// Property handling... ////////////// Property handling...

View File

@ -29,7 +29,6 @@ import eva2.tools.StringTools;
import eva2.tools.jproxy.RemoteStateListener; import eva2.tools.jproxy.RemoteStateListener;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.io.Serializable;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -38,8 +37,6 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.help.*; import javax.help.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.TitledBorder;
import javax.swing.plaf.SeparatorUI;
/** /**
@ -75,7 +72,7 @@ public class EvAClient extends JFrame implements RemoteStateListener {
// LogPanel // LogPanel
private LoggingPanel logPanel; private LoggingPanel logPanel;
private static final Logger LOGGER = Logger.getLogger(EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(EvAClient.class.getName());
// Module: // Module:
private ExtAction actModuleLoad; private ExtAction actModuleLoad;

View File

@ -31,7 +31,7 @@ import javax.swing.JToolBar;
*/ */
public class EvAModuleButtonPanelMaker implements RemoteStateListener, Serializable, PanelMaker { public class EvAModuleButtonPanelMaker implements RemoteStateListener, Serializable, PanelMaker {
private static final Logger LOGGER = Logger.getLogger(EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(EvAModuleButtonPanelMaker.class.getName());
private String m_Name = "undefined"; private String m_Name = "undefined";
private ModuleAdapter moduleAdapter; private ModuleAdapter moduleAdapter;
private boolean runningState; private boolean runningState;

View File

@ -22,7 +22,7 @@ import javax.swing.plaf.basic.BasicButtonUI;
*/ */
public class EvATabbedFrameMaker implements Serializable, PanelMaker, InterfaceNotifyOnInformers { public class EvATabbedFrameMaker implements Serializable, PanelMaker, InterfaceNotifyOnInformers {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(EvATabbedFrameMaker.class.getName());
private static final long serialVersionUID = 2637376545826821423L; private static final long serialVersionUID = 2637376545826821423L;
private ArrayList<PanelMaker> pmContainer = null; private ArrayList<PanelMaker> pmContainer = null;
private JExtToolBar extToolBar; private JExtToolBar extToolBar;

View File

@ -23,7 +23,7 @@ import javax.swing.KeyStroke;
*/ */
public class ExtDesktopManager extends DefaultDesktopManager { public class ExtDesktopManager extends DefaultDesktopManager {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(ExtDesktopManager.class.getName());
int WINDOW_LIST_START; int WINDOW_LIST_START;
public final static String INDEX = "Index"; public final static String INDEX = "Index";

View File

@ -19,7 +19,7 @@ import javax.swing.event.ListSelectionListener;
public class GenericArrayEditor extends JPanel implements PropertyEditor { public class GenericArrayEditor extends JPanel implements PropertyEditor {
private final static Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private final static Logger LOGGER = Logger.getLogger(GenericArrayEditor.class.getName());
/** /**
* Handles property change notification * Handles property change notification
*/ */
@ -283,7 +283,7 @@ public class GenericArrayEditor extends JPanel implements PropertyEditor {
final PropertyEditor e = (PropertyEditor) editorClass.newInstance(); final PropertyEditor e = (PropertyEditor) editorClass.newInstance();
if (e instanceof GenericObjectEditor) { if (e instanceof GenericObjectEditor) {
((GenericObjectEditor) e).setClassType(valueClass); ((GenericObjectEditor) e).setClassType(valueClass);
} }
e.setValue(value); e.setValue(value);
JPanel cellPanel = new JPanel() { JPanel cellPanel = new JPanel() {

View File

@ -32,7 +32,7 @@ import eva2.tools.jproxy.RMIProxyLocal;
public class GenericObjectEditor implements PropertyEditor { public class GenericObjectEditor implements PropertyEditor {
private static final Logger logger = Logger.getLogger(EvAInfo.defaultLogger); private static final Logger logger = Logger.getLogger(GenericObjectEditor.class.getName());
private Object m_Object; private Object m_Object;
private Object m_Backup; private Object m_Backup;
private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this); private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);

View File

@ -30,7 +30,7 @@ import javax.swing.table.TableModel;
*/ */
public class PropertySheetPanel extends JPanel implements PropertyChangeListener { public class PropertySheetPanel extends JPanel implements PropertyChangeListener {
public final static Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); public final static Logger LOGGER = Logger.getLogger(PropertySheetPanel.class.getName());
/** /**
* The target object being edited. * The target object being edited.
*/ */

View File

@ -25,7 +25,7 @@ public class EvAServer {
//private EvAComAdapter m_ComAdapter; //private EvAComAdapter m_ComAdapter;
private static String userName; private static String userName;
private RMIServerEvA rmiServer; private RMIServerEvA rmiServer;
private static final Logger LOGGER = Logger.getLogger(EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(EvAServer.class.getName());
/** /**
* Constructor of EvAServer. Calls RMIConnection(). * Constructor of EvAServer. Calls RMIConnection().

View File

@ -29,7 +29,7 @@ import java.util.logging.Logger;
* Collect available ModuleAdapter implementations and load them on request. * Collect available ModuleAdapter implementations and load them on request.
*/ */
public class ModuleServer { public class ModuleServer {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(ModuleServer.class.getName());
private static int instanceCounter = 0; private static int instanceCounter = 0;
private List<Class<?>> moduleClassList; private List<Class<?>> moduleClassList;
private ModuleAdapter moduleAdapter; private ModuleAdapter moduleAdapter;

View File

@ -14,65 +14,87 @@ import eva2.server.go.problems.InterfaceOptimizationProblem;
*/ */
public class NoMutation implements InterfaceMutation, java.io.Serializable { public class NoMutation implements InterfaceMutation, java.io.Serializable {
/** This method will enable you to clone a given mutation operator /**
* This method will enable you to clone a given mutation operator
*
* @return The clone * @return The clone
*/ */
@Override
public Object clone() { public Object clone() {
return new NoMutation(); return new NoMutation();
} }
/** This method allows you to evaluate wether two mutation operators /**
* are actually the same. * This method allows you to evaluate wether two mutation operators are
* @param mutator The other mutation operator * actually the same.
*
* @param mutator The other mutation operator
*/ */
@Override
public boolean equals(Object mutator) { public boolean equals(Object mutator) {
if (mutator instanceof NoMutation) return true; if (mutator instanceof NoMutation) {
else return false; return true;
} else {
return false;
}
} }
/** This method allows you to init the mutation operator /**
* @param individual The individual that will be mutated. * This method allows you to init the mutation operator
* @param opt The optimization problem. *
* @param individual The individual that will be mutated.
* @param opt The optimization problem.
*/ */
@Override
public void init(AbstractEAIndividual individual, InterfaceOptimizationProblem opt) { public void init(AbstractEAIndividual individual, InterfaceOptimizationProblem opt) {
} }
/** This method will mutate a given AbstractEAIndividual. If the individual /**
* This method will mutate a given AbstractEAIndividual. If the individual
* doesn't implement InterfaceGAIndividual nothing happens. * doesn't implement InterfaceGAIndividual nothing happens.
* @param individual The individual that is to be mutated *
* @param individual The individual that is to be mutated
*/ */
@Override
public void mutate(AbstractEAIndividual individual) { public void mutate(AbstractEAIndividual individual) {
} }
/** This method allows you to perform either crossover on the strategy parameters /**
* or to deal in some other way with the crossover event. * This method allows you to perform either crossover on the strategy
* @param indy1 The original mother * parameters or to deal in some other way with the crossover event.
* @param partners The original partners *
* @param indy1 The original mother
* @param partners The original partners
*/ */
@Override
public void crossoverOnStrategyParameters(AbstractEAIndividual indy1, Population partners) { public void crossoverOnStrategyParameters(AbstractEAIndividual indy1, Population partners) {
// nothing to do here // nothing to do here
} }
/** This method allows you to get a string representation of the mutation /**
* This method allows you to get a string representation of the mutation
* operator * operator
*
* @return A descriptive string. * @return A descriptive string.
*/ */
@Override
public String getStringRepresentation() { public String getStringRepresentation() {
return "No mutation"; return "No mutation";
} }
/********************************************************************************************************************** /**
* These are for GUI * This method allows the CommonJavaObjectEditorPanel to read the name to
*/ * the current object.
/** This method allows the CommonJavaObjectEditorPanel to read the *
* name to the current object.
* @return The name. * @return The name.
*/ */
public String getName() { public String getName() {
return "No mutation"; return "No mutation";
} }
/** This method returns a global info string
/**
* This method returns a global info string
*
* @return description * @return description
*/ */
public static String globalInfo() { public static String globalInfo() {

View File

@ -40,7 +40,7 @@ import java.util.logging.Logger;
public class Population extends ArrayList implements PopulationInterface, Cloneable, java.io.Serializable { public class Population extends ArrayList implements PopulationInterface, Cloneable, java.io.Serializable {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(Population.class.getName());
protected int generationCount = 0; protected int generationCount = 0;
protected int functionCallCount = 0; protected int functionCallCount = 0;
protected int targetPopSize = 50; protected int targetPopSize = 50;

View File

@ -23,7 +23,7 @@ import java.util.logging.Logger;
public abstract class AbstractGOParameters implements InterfaceGOParameters, Serializable { public abstract class AbstractGOParameters implements InterfaceGOParameters, Serializable {
protected static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); protected static final Logger LOGGER = Logger.getLogger(AbstractGOParameters.class.getName());
protected long randomSeed = (long)0.0; protected long randomSeed = (long)0.0;
// Opt. Algorithms and Parameters // Opt. Algorithms and Parameters

View File

@ -25,7 +25,7 @@ import java.util.logging.Logger;
*/ */
public class EPParameters extends AbstractGOParameters implements InterfaceGOParameters, Serializable { public class EPParameters extends AbstractGOParameters implements InterfaceGOParameters, Serializable {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(EPParameters.class.getName());
/** /**

View File

@ -24,7 +24,7 @@ import java.util.logging.Logger;
*/ */
public class GAParameters extends AbstractGOParameters implements InterfaceGOParameters, Serializable { public class GAParameters extends AbstractGOParameters implements InterfaceGOParameters, Serializable {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(GAParameters.class.getName());
/** /**
* Load or create a new instance of the class. * Load or create a new instance of the class.

View File

@ -26,6 +26,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
package eva2.tools; package eva2.tools;
import eva2.EvAInfo;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
@ -39,14 +40,12 @@ import java.util.ArrayList;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
import eva2.EvAInfo;
import java.util.logging.Level;
import java.util.logging.Logger;
/** /**
* Loads resource file from directory OR jar file. Now it is easier possible to * Loads resource file from directory OR jar file. Now it is easier possible to
@ -61,16 +60,12 @@ import java.util.logging.Logger;
*/ */
public class BasicResourceLoader implements ResourceLoader public class BasicResourceLoader implements ResourceLoader
{ {
//~ Static fields/initializers /////////////////////////////////////////////
/** /**
* Obtain a suitable logger. * Obtain a suitable logger.
*/ */
private static Logger logger = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static Logger logger = Logger.getLogger(BasicResourceLoader.class.getName());
private static BasicResourceLoader resourceLoader; private static BasicResourceLoader resourceLoader;
//~ Constructors ///////////////////////////////////////////////////////////
/** /**
* Constructor for the ResourceLoader object * Constructor for the ResourceLoader object
*/ */
@ -78,8 +73,6 @@ public class BasicResourceLoader implements ResourceLoader
{ {
} }
//~ Methods ////////////////////////////////////////////////////////////////
/** /**
* Description of the Method * Description of the Method
* *

View File

@ -18,7 +18,7 @@ import java.util.logging.Logger;
* *
*/ */
public class EVAERROR { public class EVAERROR {
private static final Logger logger = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger logger = Logger.getLogger(EVAERROR.class.getName());
private static transient HashMap<String, Boolean> errorMap = null; private static transient HashMap<String, Boolean> errorMap = null;
/** /**
* *

View File

@ -15,7 +15,7 @@ public class Serializer {
/** /**
* The logging instance for this class. * The logging instance for this class.
*/ */
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(Serializer.class.getName());
/** /**
* Private constructor to prevent instantiating module class. * Private constructor to prevent instantiating module class.

View File

@ -9,9 +9,6 @@ package eva2.tools.jproxy;
* $Date: 2004/04/28 07:50:32 $ * $Date: 2004/04/28 07:50:32 $
* $Author: ulmerh $ * $Author: ulmerh $
*/ */
/*==========================================================================*
* IMPORTS
*==========================================================================*/
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.rmi.Naming; import java.rmi.Naming;
import java.rmi.NotBoundException; import java.rmi.NotBoundException;
@ -29,7 +26,7 @@ import java.util.logging.Logger;
* *
*/ */
public class ComAdapter { public class ComAdapter {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(ComAdapter.class.getName());
public static final int PORT = 1099; public static final int PORT = 1099;
public static final String SEP = "_"; public static final String SEP = "_";
static protected ComAdapter m_instance = null; static protected ComAdapter m_instance = null;

View File

@ -18,7 +18,7 @@ import java.util.logging.Logger;
*/ */
public class MainAdapterImpl implements MainAdapter { public class MainAdapterImpl implements MainAdapter {
private static final Logger LOGGER = Logger.getLogger(eva2.EvAInfo.defaultLogger); private static final Logger LOGGER = Logger.getLogger(MainAdapterImpl.class.getName());
public static final String MAIN_ADAPTER_NAME = "MainRemoteObjectName"; public static final String MAIN_ADAPTER_NAME = "MainRemoteObjectName";
public static final int PORT = 1099; public static final int PORT = 1099;
private String m_Buf = ""; private String m_Buf = "";

View File

@ -47,7 +47,7 @@ public class RMIServer {
protected static String userName; protected static String userName;
protected static int numberOfVM = 0; protected static int numberOfVM = 0;
private Registry myRegistry = null; private Registry myRegistry = null;
protected static final Logger LOGGER = Logger.getLogger(EvAInfo.defaultLogger); protected static final Logger LOGGER = Logger.getLogger(RMIServer.class.getName());
/** /**
* *