de.enough.polish.ant.build
Class BuildSetting

java.lang.Object
  extended by de.enough.polish.ant.build.BuildSetting

public class BuildSetting
extends Object

Represents the build settings of a polish J2ME project.

Copyright Enough Software 2004 - 2011

 history
        22-Jan-2003 - rob creation
 

Author:
Robert Virkus, robert@enough.de

Field Summary
static String IMG_LOAD_BACKGROUND
           
static String IMG_LOAD_FOREGROUND
           
static String TARGET_1_1
           
static String TARGET_1_2
           
 
Constructor Summary
BuildSetting(org.apache.tools.ant.Project antProject, Environment environment)
          Creates a new build setting.
 
Method Summary
 boolean abortOnError()
           
 void addConfiguredCompiler(CompilerTask task)
           
 void addConfiguredDebug(LogSetting setting)
           
 void addConfiguredDoja(ClassSetting setting)
           
 void addConfiguredFile(FileSetting setting)
          Adds the filename to a rag task, not used in the j2mepolish task
 void addConfiguredFinalizer(FinalizerSetting setting)
           
 void addConfiguredFullscreen(FullScreenSetting setting)
           
 void addConfiguredIappli(ClassSetting setting)
           
 void addConfiguredJad(JadAttributes attributes)
           
 void addConfiguredMain(ClassSetting setting)
           
 void addConfiguredManifestFilter(AttributesFilter filter)
           
 void addConfiguredMidlet(Midlet midlet)
           
 void addConfiguredMidlets(MidletSetting setting)
           
 void addConfiguredObfuscator(ObfuscatorSetting setting)
           
 void addConfiguredPackager(PackageSetting setting)
           
 void addConfiguredPostCompiler(PostCompilerSetting setting)
           
 void addConfiguredPostObfuscator(PostObfuscatorSetting setting)
           
 void addConfiguredPreCompiler(PreCompilerSetting setting)
           
 void addConfiguredPreprocessor(PreprocessorSetting preprocessor)
           
 void addConfiguredPreverifier(PreverifierSetting setting)
           
 void addConfiguredSerialize(SerializeSetting setting)
          Adds a serializer to a rag task, not used in the j2mepolish task
 void addConfiguredSign(SignSetting setting)
           
 void addConfiguredSources(SourcesSetting setting)
           
 void addConfiguredVariables(Variables vars)
           
 boolean alwaysUsePolishGui()
          Determines whether the J2ME Polish GUI should beused even for devices which do not "usually" support it.
 JavaExtension createJava()
           
 LibrariesSetting createLibraries()
          Creates a new <libraries> element or returns an existing one.
 ResourceSetting createResources()
           
 boolean doCompile()
          Determines whether the project should be compiled.
 boolean doObfuscate()
          Determines whether the resulting jars should be obfuscated at all.
 boolean doPostCompile()
           
 boolean doPostObfuscate()
           
 boolean doPreCompile()
           
 boolean doPreverify()
          Determines whether the project should get preverified.
 boolean doPreverifyInCompilerMode()
           
 Attribute[] filterJadAttributes(HashMap attributesMap, BooleanEvaluator evaluator)
          Filters the given JAD attributes.
 Attribute[] filterManifestAttributes(HashMap attributesMap, BooleanEvaluator evaluator)
          Filters the given manifest attributes.
 File getApiDir()
           
 LibrariesSetting getBinaryLibraries()
          Retrieves third party libraries which are only available in binary form.
 CompilerTask getCompiler(BooleanEvaluator evaluator)
          Retrieves the appropriate compiler setting
 File getCompilerDestDir()
          Retrieves the target directory for compiled classes.
 File getCustomExtensions()
           
 LogSetting getDebugSetting(Environment environment)
           
 File getDestDir(Environment env)
          Retrieves the directory to which the ready-to-distribute jars should be copied to.
 Map getDeviceDatabaseFiles()
           
 Map getDeviceDatabaseInputStreams()
           
 ClassSetting getDojaClassSetting()
           
 String getEncoding()
          Sets the encoding for the JAD, MANIFEST.
protected  File getFile(String path)
          Resolves the given path and returns a file handle for that path.
protected  File getFile(String path, boolean tryPolishHomePath)
          Resolves the given path and returns a file handle for that path.
 FileSetting getFileSetting()
           
 Finalizer[] getFinalizers(ExtensionManager manager, Environment environment)
           
 FullScreenSetting getFullScreenSetting()
          Retrieves the full screen setting.
 String getImageLoadStrategy()
          Retrieves the strategy by which images should be loaded.
 JadAttributes getJadAttributes()
           
 String getJavacTarget()
          Retrieves the target to which the java-sources should be compiled.
 JavaExtension[] getJavaExtensions()
          Retrieves the extensions with a java-element.
 ClassSetting getMainClassSetting()
           
 String[] getMidletClassNames(Environment environment)
          Retrieves all the defined MIDlet-class-names.
 String[] getMidletInfos(String defaultIcon, Environment environment)
          Retrieves the infos for all midlets.
 Midlet[] getMidlets(Environment environment)
          Retrieves all MIDlet definitions.
 ObfuscatorSetting[] getObfuscatorSettings()
           
 String getOnError()
           
 PackageSetting[] getPackageSettings()
           
 File getPolishDir()
          Retrieves the directory containing the J2ME source code of polish.
 PostCompilerSetting[] getPostCompilers()
           
 PostObfuscatorSetting[] getPostObfuscators()
           
 PreCompilerSetting[] getPreCompilers()
           
 PreprocessorSetting[] getPreprocessors()
           
 PreverifierSetting[] getPreverifierSettings()
           
 File getPreverify()
           
protected  File getProjectOrAbsoluteFile(String path, boolean tryPolishHomePath)
          Resolves the given path and returns a file handle for that path.
 ResourceSetting getResourceSetting()
          Retrieves the setting for resource handling.
 ArrayList getSerializers()
           
 SignSetting getSignSetting()
           
 SourceSetting[] getSourceSettings()
          Retrieves all external source directories.
 String getSymbols()
           
 Variables getVariables()
           
 File getWorkDir()
          Retrieves the working directory.
 boolean hasUserDefinedJadAttributesFilter()
          Determines whether there is a filter registered for JAD attributes
 boolean hasUserDefinedManifestAttributesFilter()
          Determines whether there is a filter registered for manifest attributes
 boolean includeAntProperties()
           
 boolean isDebugEnabled(Environment environment)
          Determines whether debugging is enabled.
 boolean isInCompilerMode()
          Determines whether the compiler-mode of J2ME Polish is activated.
 InputStream openApis()
          Retrieves the apis.xml file as input stream.
 InputStream openCapabilities()
           
 InputStream openConfigurations()
           
 InputStream openCustomCssAttributes()
          Opens the [custom-css-attributes.xml] file.
 InputStream openDevices()
           
 InputStream openExtensions()
           
 InputStream openGroups()
           
 InputStream openPlatforms()
           
 InputStream openStandardCssAttributes()
          Opens the [css-attributes.xml] file.
 InputStream openVendors()
          Retrieves the vendors.xml file as input stream.
 boolean replacePropertiesWithoutDirective()
           
 void setAbortOnError(boolean abortOnError)
           
 void setApiDir(String apiPath)
          Sets the directory which contains device specific libraries
 void setApis(String apisPath)
          Sets the path to the apis.xml file.
 void setBinaryLibraries(String librariesStr)
          Sets additional third party libraries which are only available in binary form.
 void setBinaryLibrary(String librariesStr)
          Same as setBinaryLibraries
 void setCompile(String compile)
          Determines whether the project should get compiled.
 void setCompilerDestDir(File destinationDir)
          Sets the destination directory for compiled classes.
 void setCompilerMode(boolean enable)
          Enables or disables the compiler-mode of J2ME Polish.
 void setCompilerModePreverify(boolean enable)
           
 void setCustomApis(File customApis)
           
 void setCustomConfigurations(File customConfigurations)
           
 void setCustomDevices(File customDevices)
           
 void setCustomExtensions(File customExtensions)
           
 void setCustomGroups(File customGroups)
           
 void setCustomPlatforms(File customPlatforms)
           
 void setCustomVendors(File customVendors)
           
 void setDestDir(String destPath)
          Sets the destination directory.
 void setDevices(String devicesPath)
          Sets the path to the device.xml file.
 void setEncoding(String encoding)
          Sets the encoding for the JAD, MANIFEST.
 void setFullscreen(String setting)
           
 void setGroups(String groupsPath)
          Sets the path to the groups.xml file
 void setImageLoadStrategy(String strategy)
           
 void setJavacTarget(String javacTarget)
          Sets the target to which the java-sources should be compiled.
 void setMidp1Path(String midp1PathStr)
          Sets the path to the api-file of the MIDP/1.0 environment
 void setMidp2Cldc11Path(String midp2Cldc11PathStr)
          Sets the path to the api-file of the MIDP/2.0 / CLDC/1.1 environment.
 void setMidp2Path(String midp2PathStr)
          Sets the path to the api-file of the MIDP/2.0 environment.
 void setObfuscate(boolean obfuscate)
          Determines whether the resulting jars should be obfuscated at all.
 void setObfuscator(String obfuscator)
          Sets the name of the obfuscator.
 void setOnError(String onError)
           
 void setPolishDir(String polishPath)
          Sets the directory containing the J2ME source code of polish.
 void setPreverify(String preverifyPath)
          Sets the path to the preverify executable.
 void setReplacePropertiesWithoutDirective(boolean enable)
           
 void setResDir(File resDir)
          Sets the directory containing the resources of this project.
 void setSourceDir(String srcDir)
          Sets the source directory in which the source files for the application reside.
 void setSrcdir(String srcDir)
           
 void setSrcDir(String srcDir)
           
 void setSymbols(String symbols)
           
 void setUsePolishGui(String usePolishGuiStr)
           
 void setVendors(String vendorsPath)
          Sets the path to the vendors.xml file
 void setWorkDir(File workDir)
          Sets the working directory.
 boolean usePolishGui()
          Determines whether this project should use the polish GUI at all.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMG_LOAD_BACKGROUND

public static final String IMG_LOAD_BACKGROUND
See Also:
Constant Field Values

IMG_LOAD_FOREGROUND

public static final String IMG_LOAD_FOREGROUND
See Also:
Constant Field Values

TARGET_1_1

public static final String TARGET_1_1
See Also:
Constant Field Values

TARGET_1_2

public static final String TARGET_1_2
See Also:
Constant Field Values
Constructor Detail

BuildSetting

public BuildSetting(org.apache.tools.ant.Project antProject,
                    Environment environment)
Creates a new build setting.

Parameters:
antProject - The corresponding ant-project.
environment - the environment
Method Detail

addConfiguredObfuscator

public void addConfiguredObfuscator(ObfuscatorSetting setting)

addConfiguredMidlets

public void addConfiguredMidlets(MidletSetting setting)

addConfiguredMidlet

public void addConfiguredMidlet(Midlet midlet)

addConfiguredFullscreen

public void addConfiguredFullscreen(FullScreenSetting setting)

addConfiguredDebug

public void addConfiguredDebug(LogSetting setting)

addConfiguredVariables

public void addConfiguredVariables(Variables vars)

addConfiguredManifestFilter

public void addConfiguredManifestFilter(AttributesFilter filter)

addConfiguredJad

public void addConfiguredJad(JadAttributes attributes)

addConfiguredPackager

public void addConfiguredPackager(PackageSetting setting)

addConfiguredPreprocessor

public void addConfiguredPreprocessor(PreprocessorSetting preprocessor)

addConfiguredSources

public void addConfiguredSources(SourcesSetting setting)

addConfiguredSign

public void addConfiguredSign(SignSetting setting)

addConfiguredPreverifier

public void addConfiguredPreverifier(PreverifierSetting setting)

getSignSetting

public SignSetting getSignSetting()

addConfiguredFinalizer

public void addConfiguredFinalizer(FinalizerSetting setting)
Parameters:
setting -

addConfiguredCompiler

public void addConfiguredCompiler(CompilerTask task)

addConfiguredPreCompiler

public void addConfiguredPreCompiler(PreCompilerSetting setting)

addConfiguredPostCompiler

public void addConfiguredPostCompiler(PostCompilerSetting setting)

addConfiguredPostObfuscator

public void addConfiguredPostObfuscator(PostObfuscatorSetting setting)

addConfiguredSerialize

public void addConfiguredSerialize(SerializeSetting setting)
Adds a serializer to a rag task, not used in the j2mepolish task


addConfiguredFile

public void addConfiguredFile(FileSetting setting)
Adds the filename to a rag task, not used in the j2mepolish task


getPreprocessors

public PreprocessorSetting[] getPreprocessors()

createJava

public JavaExtension createJava()

createResources

public ResourceSetting createResources()

getVariables

public Variables getVariables()

getJadAttributes

public JadAttributes getJadAttributes()

getResourceSetting

public ResourceSetting getResourceSetting()
Retrieves the setting for resource handling.

Returns:
the setting for resource handling.

includeAntProperties

public boolean includeAntProperties()
Returns:
Returns the includeAntProperties.

setSymbols

public void setSymbols(String symbols)

setUsePolishGui

public void setUsePolishGui(String usePolishGuiStr)

usePolishGui

public boolean usePolishGui()
Determines whether this project should use the polish GUI at all. The GUI is only used when the current device allows the use of the GUI. The GUI makes no sense for devices with black and white screens, for example.

Returns:
true when this projects wants to use the polish GUI

alwaysUsePolishGui

public boolean alwaysUsePolishGui()
Determines whether the J2ME Polish GUI should beused even for devices which do not "usually" support it.

Returns:
true when the J2ME Polish GUI should be used for all devices

setImageLoadStrategy

public void setImageLoadStrategy(String strategy)

getImageLoadStrategy

public String getImageLoadStrategy()
Retrieves the strategy by which images should be loaded.

Returns:
either IMG_LOAD_BACKGROUND or IMG_LOAD_FOREGROUND
See Also:
IMG_LOAD_BACKGROUND, IMG_LOAD_FOREGROUND

setFullscreen

public void setFullscreen(String setting)

getFullScreenSetting

public FullScreenSetting getFullScreenSetting()
Retrieves the full screen setting.

Returns:
the full screen setting

getDebugSetting

public LogSetting getDebugSetting(Environment environment)

getMidlets

public Midlet[] getMidlets(Environment environment)
Retrieves all MIDlet definitions.

Parameters:
environment - the environment
Returns:
all found MIDlet definitios

isDebugEnabled

public boolean isDebugEnabled(Environment environment)
Determines whether debugging is enabled.

Parameters:
environment - the environment
Returns:
true when debugging is enabled for this project.

getWorkDir

public File getWorkDir()
Retrieves the working directory. The default working directory is "./build". If the working directory does not exist, it will be created now.

Returns:
Returns the working directory.

setWorkDir

public void setWorkDir(File workDir)
Sets the working directory. Defaults to "./build".

Parameters:
workDir - The working directory to set.

getDestDir

public File getDestDir(Environment env)
Retrieves the directory to which the ready-to-distribute jars should be copied to. Defaults to "./dist". If the distribution directory does not exist, it will be created now.

Returns:
The destination directory.

setDestDir

public void setDestDir(String destPath)
Sets the destination directory. Defaults to "./dist".

Parameters:
destPath - The destination directory, can contain J2ME Polish variables such as ${polish.vendor} or ${polish.locale}.

setResDir

public void setResDir(File resDir)
Sets the directory containing the resources of this project. Default resource directory is "./resources". Resources include pictures, texts, etc. as well as the CSS-files containing the design information.

Parameters:
resDir - The directory containing the resources.

setPolishDir

public void setPolishDir(String polishPath)
Sets the directory containing the J2ME source code of polish.

Parameters:
polishPath - the directory containing the J2ME source code of polish.

getPolishDir

public File getPolishDir()
Retrieves the directory containing the J2ME source code of polish.

Returns:
the directory containing the J2ME source code of polish

setSrcdir

public void setSrcdir(String srcDir)

setSrcDir

public void setSrcDir(String srcDir)

setSourceDir

public void setSourceDir(String srcDir)
Sets the source directory in which the source files for the application reside.

Parameters:
srcDir - the source directory

getSourceSettings

public SourceSetting[] getSourceSettings()
Retrieves all external source directories.

Returns:
an arrray with at least one source directory.

openApis

public InputStream openApis()
Retrieves the apis.xml file as input stream.

Returns:
Returns the apis.xml file as input stream.

openConfigurations

public InputStream openConfigurations()

openPlatforms

public InputStream openPlatforms()

openExtensions

public InputStream openExtensions()

openCapabilities

public InputStream openCapabilities()

setApis

public void setApis(String apisPath)
Sets the path to the apis.xml file.

Parameters:
apisPath - the path to the apis.xml file

getApiDir

public File getApiDir()
Returns:
Returns the the directory which contains device specific libraries.

setApiDir

public void setApiDir(String apiPath)
Sets the directory which contains device specific libraries

Parameters:
apiPath - The directory which contains device specific libraries. Defaults to "./import"

openDevices

public InputStream openDevices()
Returns:
Returns the xml file containing the devices-data.

setDevices

public void setDevices(String devicesPath)
Sets the path to the device.xml file.

Parameters:
devicesPath - The path to the devices.xml

openGroups

public InputStream openGroups()
Returns:
Returns the groups.

setGroups

public void setGroups(String groupsPath)
Sets the path to the groups.xml file

Parameters:
groupsPath - The path to the groups.xml file

openVendors

public InputStream openVendors()
Retrieves the vendors.xml file as input stream.

Returns:
Returns the vendors.xml file as input stream.

setVendors

public void setVendors(String vendorsPath)
Sets the path to the vendors.xml file

Parameters:
vendorsPath - The path to the vendors.xml file

setMidp1Path

public void setMidp1Path(String midp1PathStr)
Sets the path to the api-file of the MIDP/1.0 environment

Parameters:
midp1PathStr - The path to the MIDP/1.0-api-file

setMidp2Path

public void setMidp2Path(String midp2PathStr)
Sets the path to the api-file of the MIDP/2.0 environment. When the midp1Path is not defined, it will use the same api-path as the given MIDP/2.0 environment.

Parameters:
midp2PathStr - The path to the MIDP/2.0-api-file

setMidp2Cldc11Path

public void setMidp2Cldc11Path(String midp2Cldc11PathStr)
Sets the path to the api-file of the MIDP/2.0 / CLDC/1.1 environment.

Parameters:
midp2Cldc11PathStr - The path to the MIDP/2.0-api-file

getSymbols

public String getSymbols()
Returns:
The user-defined symbols

setPreverify

public void setPreverify(String preverifyPath)
Sets the path to the preverify executable.

Parameters:
preverifyPath - the path to the preverify executable.

setCompile

public void setCompile(String compile)
Determines whether the project should get compiled.

Parameters:
compile - string to flag if we should compile or not

getPreverify

public File getPreverify()

doPreverify

public boolean doPreverify()
Determines whether the project should get preverified.

Returns:
true when the project should get preverified.

doCompile

public boolean doCompile()
Determines whether the project should be compiled. This is used for android building.

Returns:
true when the project should get preverified.

getMidletClassNames

public String[] getMidletClassNames(Environment environment)
Retrieves all the defined MIDlet-class-names.

Parameters:
environment - the environment
Returns:
The names of all midlet-classes in a String array. The first midlet is also the first element in the returned array.

getMidletInfos

public String[] getMidletInfos(String defaultIcon,
                               Environment environment)
Retrieves the infos for all midlets. The infos contain the name, the icon and the class of the midlet and are used for the JAD and the manifest.

Parameters:
defaultIcon - the url of the default icon.
environment - environment settings
Returns:
The infos of all midlets in a String array. The first midlet is also the first element in the returned array.

getObfuscatorSettings

public ObfuscatorSetting[] getObfuscatorSettings()
Returns:
The obfuscators which should be used

setObfuscator

public void setObfuscator(String obfuscator)
Sets the name of the obfuscator.

Parameters:
obfuscator - The name of the obfuscator, e.g. "ProGuard" or "RetroGuard"

doObfuscate

public boolean doObfuscate()
Determines whether the resulting jars should be obfuscated at all.

Returns:
True when the jars should be obfuscated.

setObfuscate

public void setObfuscate(boolean obfuscate)
Determines whether the resulting jars should be obfuscated at all.

Parameters:
obfuscate - True when the jars should be obfuscated.

getFile

protected File getFile(String path)
Resolves the given path and returns a file handle for that path.

Parameters:
path - the relative or absolute path, e.g. "resources2"
Returns:
the file handle for the path

getFile

protected File getFile(String path,
                       boolean tryPolishHomePath)
Resolves the given path and returns a file handle for that path.

Parameters:
path - the relative or absolute path, e.g. "resources2"
tryPolishHomePath - true when the file should also be searched in the polishHomePath
Returns:
the file handle for the path

getProjectOrAbsoluteFile

protected File getProjectOrAbsoluteFile(String path,
                                        boolean tryPolishHomePath)
Resolves the given path and returns a file handle for that path.

Parameters:
path - the relative or absolute path, e.g. "resources2"
tryPolishHomePath - true when the file should also be searched in the polishHomePath
Returns:
the file handle for the path

hasUserDefinedJadAttributesFilter

public boolean hasUserDefinedJadAttributesFilter()
Determines whether there is a filter registered for JAD attributes

Returns:
true when there is a filter defined.

filterJadAttributes

public Attribute[] filterJadAttributes(HashMap attributesMap,
                                       BooleanEvaluator evaluator)
Filters the given JAD attributes.

Parameters:
attributesMap - a hash map containing the available attributes with the attribute-names as keys.
evaluator - the evaluator for getting the correct filter
Returns:
an array of attributes in the correct order, not all given attributes are guaranteed to be included.
Throws:
NullPointerException - when there is no JAD-attribute filter.

hasUserDefinedManifestAttributesFilter

public boolean hasUserDefinedManifestAttributesFilter()
Determines whether there is a filter registered for manifest attributes

Returns:
true when there is a filter defined.

filterManifestAttributes

public Attribute[] filterManifestAttributes(HashMap attributesMap,
                                            BooleanEvaluator evaluator)
Filters the given manifest attributes.

Parameters:
attributesMap - a hash map containing the available attributes with the attribute-names as keys.
evaluator - the boolean evaluator for getting the correct filter
Returns:
an array of attributes in the correct order, not all given attributes are guaranteed to be included.
Throws:
NullPointerException - when there is no MANIFEST-attribute filter.

setBinaryLibrary

public void setBinaryLibrary(String librariesStr)
Same as setBinaryLibraries

Parameters:
librariesStr - the paths to either a jar-file, a zip-file or a directory containing class files, which are needed for the project. Several libraries can be seperated with either a colon or a semicolon.

setBinaryLibraries

public void setBinaryLibraries(String librariesStr)
Sets additional third party libraries which are only available in binary form.

Parameters:
librariesStr - the paths to either a jar-file, a zip-file or a directory containing class files, which are needed for the project. Several libraries can be seperated with either a colon or a semicolon.

createLibraries

public LibrariesSetting createLibraries()
Creates a new <libraries> element or returns an existing one.

Returns:
a new <libraries> element

getBinaryLibraries

public LibrariesSetting getBinaryLibraries()
Retrieves third party libraries which are only available in binary form.

Returns:
The libraries setting

getJavaExtensions

public JavaExtension[] getJavaExtensions()
Retrieves the extensions with a java-element.

Returns:
an array of JavaExtension

openStandardCssAttributes

public InputStream openStandardCssAttributes()
Opens the [css-attributes.xml] file.

Returns:
an input stream to that file
Throws:
BuildException - when the file could not be found

openCustomCssAttributes

public InputStream openCustomCssAttributes()
Opens the [custom-css-attributes.xml] file.

Returns:
an input stream to that file or null when the file could not be found.

getJavacTarget

public String getJavacTarget()
Retrieves the target to which the java-sources should be compiled. When a specific target has been set, that one will be used. Otherwise a target will dynamically be created:

Returns:
Returns the javac-target.

setJavacTarget

public void setJavacTarget(String javacTarget)
Sets the target to which the java-sources should be compiled. Should be either "1.1" or "1.2".

Parameters:
javacTarget - The javac-target to set.

setCompilerMode

public void setCompilerMode(boolean enable)
Enables or disables the compiler-mode of J2ME Polish. In the compiler mode only one device will be processed and the execution will be aborted before the packaging is done.

Parameters:
enable - true when the compiler-mode should be enabled. The mode is disabled by default.

isInCompilerMode

public boolean isInCompilerMode()
Determines whether the compiler-mode of J2ME Polish is activated. In the compiler mode only one device will be processed and the execution will be aborted before the packaging is done. The mode is disabled by default.

Returns:
true when the compiler-mode should be enabled.

setCompilerDestDir

public void setCompilerDestDir(File destinationDir)
Sets the destination directory for compiled classes. This setting is only used when the compiler-mode is activated.

Parameters:
destinationDir - the target directory for compiled classes. The default directory is "bin/classes".

getCompilerDestDir

public File getCompilerDestDir()
Retrieves the target directory for compiled classes.

Returns:
the target directory for compiled classes. The default directory is "bin/classes".

setCompilerModePreverify

public void setCompilerModePreverify(boolean enable)

doPreverifyInCompilerMode

public boolean doPreverifyInCompilerMode()

getPackageSettings

public PackageSetting[] getPackageSettings()

getCompiler

public CompilerTask getCompiler(BooleanEvaluator evaluator)
Retrieves the appropriate compiler setting

Parameters:
evaluator - the evaluator for boolean conditions
Returns:
a suitable compiler task

setEncoding

public void setEncoding(String encoding)
Sets the encoding for the JAD, MANIFEST.

Parameters:
encoding - the encoding, defaults to "UTF8"

getEncoding

public String getEncoding()
Sets the encoding for the JAD, MANIFEST.

Returns:
the encoding, defaults to "UTF8"

getPreCompilers

public PreCompilerSetting[] getPreCompilers()

doPreCompile

public boolean doPreCompile()

getPostObfuscators

public PostObfuscatorSetting[] getPostObfuscators()

doPostCompile

public boolean doPostCompile()
Returns:
true when there are postcompilers

getPostCompilers

public PostCompilerSetting[] getPostCompilers()

doPostObfuscate

public boolean doPostObfuscate()
Returns:
true when there are postobfuscators

getFinalizers

public Finalizer[] getFinalizers(ExtensionManager manager,
                                 Environment environment)
Parameters:
manager -
environment -
Returns:
an array of initialized finalizers

setCustomApis

public void setCustomApis(File customApis)
Parameters:
customApis - The customApis to set.

setCustomDevices

public void setCustomDevices(File customDevices)
Parameters:
customDevices - The customDevices to set.

setCustomConfigurations

public void setCustomConfigurations(File customConfigurations)
Parameters:
customConfigurations - The file containing custom-configurations.xml

setCustomPlatforms

public void setCustomPlatforms(File customPlatforms)
Parameters:
customPlatforms - The file containing custom-platforms.xml

setCustomExtensions

public void setCustomExtensions(File customExtensions)
Parameters:
customExtensions - The customExtensions to set.

getCustomExtensions

public File getCustomExtensions()

setCustomGroups

public void setCustomGroups(File customGroups)
Parameters:
customGroups - The customGroups to set.

setCustomVendors

public void setCustomVendors(File customVendors)
Parameters:
customVendors - The customVendors to set.

getPreverifierSettings

public PreverifierSetting[] getPreverifierSettings()

getDeviceDatabaseInputStreams

public Map getDeviceDatabaseInputStreams()
Returns:
a map which contains the openend input stream for each device database file, e.g. "devices.xml"

getDeviceDatabaseFiles

public Map getDeviceDatabaseFiles()
Returns:
a map that contains user defined files for custom-XXX files, e.g. custom-devices.xml

replacePropertiesWithoutDirective

public boolean replacePropertiesWithoutDirective()
Returns:
true when ant properties should be replaced without an explicit directive, e.g. String message="Hello ${polish.Identifier}";

setReplacePropertiesWithoutDirective

public void setReplacePropertiesWithoutDirective(boolean enable)

abortOnError

public boolean abortOnError()

setAbortOnError

public void setAbortOnError(boolean abortOnError)

getOnError

public String getOnError()

setOnError

public void setOnError(String onError)

getDojaClassSetting

public ClassSetting getDojaClassSetting()
Returns:
Returns the dojaClassSetting.

addConfiguredDoja

public void addConfiguredDoja(ClassSetting setting)
Parameters:
setting - The dojaClassSetting to set.

addConfiguredIappli

public void addConfiguredIappli(ClassSetting setting)
Parameters:
setting - The dojaClassSetting to set.

getMainClassSetting

public ClassSetting getMainClassSetting()
Returns:
Returns the mainClassSetting.

addConfiguredMain

public void addConfiguredMain(ClassSetting setting)
Parameters:
setting - The mainClassSetting to set.

getFileSetting

public FileSetting getFileSetting()

getSerializers

public ArrayList getSerializers()