de.enough.polish
Class Configuration

java.lang.Object
  extended by de.enough.polish.Configuration

public class Configuration
extends Object

Allows to configure J2ME Polish programmatically.

You can start a configuration automatically by specifying the Ant property polish.build.configuration.class that contains the fully classified name of the configuration class and polish.build.configuration.path that contains classpath for the configuration class.

Copyright Enough Software 2007

 history
        Nov 15, 2007 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
protected  PolishTask polishTask
           
 
Constructor Summary
Configuration()
           
 
Method Summary
 void abortBuild(String message)
          Aborts the build process by throwing a BuildException with the specified message.
 void addLibrary(File path)
          Adds a binary library to J2ME Polish.
 void addLibrary(String path, Environment env)
          Adds a binary library to J2ME Polish.
 void addSourceDir(String path, Environment env)
          Adds a source directory to the build path.
 void configure(PolishTask task, Environment env)
          Configures this configuration initially and allows the configuration to add J2ME Polish extensions etc.
 void postInitialize(Device device, Locale locale, Environment env)
          Allows this configuration to add settings at the end of the initialization of a new build.
 void preInitialize(Device device, Locale locale, Environment env)
          Allows this configuration to add settings at the start of the initialization of a new build.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

polishTask

protected PolishTask polishTask
Constructor Detail

Configuration

public Configuration()
Method Detail

configure

public void configure(PolishTask task,
                      Environment env)
Configures this configuration initially and allows the configuration to add J2ME Polish extensions etc. The default implementation stores the task under the instance variable "polishTask".

Parameters:
task - the J2ME Polish task
env - the environment

preInitialize

public void preInitialize(Device device,
                          Locale locale,
                          Environment env)
Allows this configuration to add settings at the start of the initialization of a new build. The default implementation doesn't do anything.

Parameters:
device - the current device
locale - the current locale, can be null
env - the environment

postInitialize

public void postInitialize(Device device,
                           Locale locale,
                           Environment env)
Allows this configuration to add settings at the end of the initialization of a new build. The default implementation doesn't do anything.

Parameters:
device - the current device
locale - the current locale, can be null
env - the environment

addLibrary

public void addLibrary(String path,
                       Environment env)
Adds a binary library to J2ME Polish.

Parameters:
path - the path to the library
env - the environment

addLibrary

public void addLibrary(File path)
Adds a binary library to J2ME Polish.

Parameters:
path - the path to the library

addSourceDir

public void addSourceDir(String path,
                         Environment env)
Adds a source directory to the build path.

Parameters:
path - the path to the source directory
env - the environment

abortBuild

public void abortBuild(String message)
Aborts the build process by throwing a BuildException with the specified message.

Parameters:
message - the message.