de.enough.polish.log
Class DefaultLogHandler

java.lang.Object
  extended by de.enough.polish.Extension
      extended by de.enough.polish.log.LogHandler
          extended by de.enough.polish.log.DefaultLogHandler

public class DefaultLogHandler
extends LogHandler

The default log handler just sets preprocessing directives according to the given parameters.

Copyright Enough Software 2005

 history
        26-Apr-2005 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.Extension
antProject, autoStartCondition, environment, extensionDefinition, extensionManager, extensionSetting, extensionTypeDefinition, isBuildStarted
 
Constructor Summary
DefaultLogHandler()
          Creates a new default log handler
 
Method Summary
protected  String getClientLogHandlerClass(Environment env)
          Retrieves the name of the corresponding handler-class that runs on the J2ME client.
 void initialize(Device device, Locale locale, Environment env)
          Initializes this extension for a new device or a new locale.
 void setParameters(Variable[] parameter, File baseDir)
           
 
Methods inherited from class de.enough.polish.log.LogHandler
execute
 
Methods inherited from class de.enough.polish.Extension
configure, executeAntTarget, executeAntTarget, finalize, getAntProject, getAutoStartCondition, getEnvironment, getExtensionDefinition, getExtensionSetting, getInstance, getParameterValue, getType, init, isConditionFulfilled, notifyBuildEnd, notifyBuildStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLogHandler

public DefaultLogHandler()
Creates a new default log handler

Method Detail

setParameters

public void setParameters(Variable[] parameter,
                          File baseDir)

initialize

public void initialize(Device device,
                       Locale locale,
                       Environment env)
Description copied from class: Extension
Initializes this extension for a new device or a new locale. The default implementation doesn't do anything.

Overrides:
initialize in class Extension
Parameters:
device - the current device
locale - the current locale, can be null
env - the environment/configuration

getClientLogHandlerClass

protected String getClientLogHandlerClass(Environment env)
Retrieves the name of the corresponding handler-class that runs on the J2ME client. The client class can be defined either with the "clientClass" parameter of the <handler>-element or by the "clientClass" setting in extensions.xml/custom-extensions.xml.

Returns:
the client log handler class
Throws:
IllegalStateException - when the client log handler class is not defined anywhere
NullPointerException - when the setting is null