|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ant.build.BuildSetting
public class BuildSetting
Represents the build settings of a polish J2ME project.
Copyright Enough Software 2004 - 2011
history
22-Jan-2003 - rob creation
| 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 |
|---|
public static final String IMG_LOAD_BACKGROUND
public static final String IMG_LOAD_FOREGROUND
public static final String TARGET_1_1
public static final String TARGET_1_2
| Constructor Detail |
|---|
public BuildSetting(org.apache.tools.ant.Project antProject,
Environment environment)
antProject - The corresponding ant-project.environment - the environment| Method Detail |
|---|
public void addConfiguredObfuscator(ObfuscatorSetting setting)
public void addConfiguredMidlets(MidletSetting setting)
public void addConfiguredMidlet(Midlet midlet)
public void addConfiguredFullscreen(FullScreenSetting setting)
public void addConfiguredDebug(LogSetting setting)
public void addConfiguredVariables(Variables vars)
public void addConfiguredManifestFilter(AttributesFilter filter)
public void addConfiguredJad(JadAttributes attributes)
public void addConfiguredPackager(PackageSetting setting)
public void addConfiguredPreprocessor(PreprocessorSetting preprocessor)
public void addConfiguredSources(SourcesSetting setting)
public void addConfiguredSign(SignSetting setting)
public void addConfiguredPreverifier(PreverifierSetting setting)
public SignSetting getSignSetting()
public void addConfiguredFinalizer(FinalizerSetting setting)
setting - public void addConfiguredCompiler(CompilerTask task)
public void addConfiguredPreCompiler(PreCompilerSetting setting)
public void addConfiguredPostCompiler(PostCompilerSetting setting)
public void addConfiguredPostObfuscator(PostObfuscatorSetting setting)
public void addConfiguredSerialize(SerializeSetting setting)
public void addConfiguredFile(FileSetting setting)
public PreprocessorSetting[] getPreprocessors()
public JavaExtension createJava()
public ResourceSetting createResources()
public Variables getVariables()
public JadAttributes getJadAttributes()
public ResourceSetting getResourceSetting()
public boolean includeAntProperties()
public void setSymbols(String symbols)
public void setUsePolishGui(String usePolishGuiStr)
public boolean usePolishGui()
public boolean alwaysUsePolishGui()
public void setImageLoadStrategy(String strategy)
public String getImageLoadStrategy()
IMG_LOAD_BACKGROUND,
IMG_LOAD_FOREGROUNDpublic void setFullscreen(String setting)
public FullScreenSetting getFullScreenSetting()
public LogSetting getDebugSetting(Environment environment)
public Midlet[] getMidlets(Environment environment)
environment - the environment
public boolean isDebugEnabled(Environment environment)
environment - the environment
public File getWorkDir()
public void setWorkDir(File workDir)
workDir - The working directory to set.public File getDestDir(Environment env)
public void setDestDir(String destPath)
destPath - The destination directory, can contain J2ME Polish variables such as ${polish.vendor} or ${polish.locale}.public void setResDir(File resDir)
resDir - The directory containing the resources.public void setPolishDir(String polishPath)
polishPath - the directory containing the J2ME source code of polish.public File getPolishDir()
public void setSrcdir(String srcDir)
public void setSrcDir(String srcDir)
public void setSourceDir(String srcDir)
srcDir - the source directorypublic SourceSetting[] getSourceSettings()
public InputStream openApis()
public InputStream openConfigurations()
public InputStream openPlatforms()
public InputStream openExtensions()
public InputStream openCapabilities()
public void setApis(String apisPath)
apisPath - the path to the apis.xml filepublic File getApiDir()
public void setApiDir(String apiPath)
apiPath - The directory which contains device specific libraries. Defaults to "./import"public InputStream openDevices()
public void setDevices(String devicesPath)
devicesPath - The path to the devices.xmlpublic InputStream openGroups()
public void setGroups(String groupsPath)
groupsPath - The path to the groups.xml filepublic InputStream openVendors()
public void setVendors(String vendorsPath)
vendorsPath - The path to the vendors.xml filepublic void setMidp1Path(String midp1PathStr)
midp1PathStr - The path to the MIDP/1.0-api-filepublic void setMidp2Path(String midp2PathStr)
midp2PathStr - The path to the MIDP/2.0-api-filepublic void setMidp2Cldc11Path(String midp2Cldc11PathStr)
midp2Cldc11PathStr - The path to the MIDP/2.0-api-filepublic String getSymbols()
public void setPreverify(String preverifyPath)
preverifyPath - the path to the preverify executable.public void setCompile(String compile)
compile - string to flag if we should compile or notpublic File getPreverify()
public boolean doPreverify()
public boolean doCompile()
public String[] getMidletClassNames(Environment environment)
environment - the environment
public String[] getMidletInfos(String defaultIcon,
Environment environment)
defaultIcon - the url of the default icon.environment - environment settings
public ObfuscatorSetting[] getObfuscatorSettings()
public void setObfuscator(String obfuscator)
obfuscator - The name of the obfuscator, e.g. "ProGuard" or "RetroGuard"public boolean doObfuscate()
public void setObfuscate(boolean obfuscate)
obfuscate - True when the jars should be obfuscated.protected File getFile(String path)
path - the relative or absolute path, e.g. "resources2"
protected File getFile(String path,
boolean tryPolishHomePath)
path - the relative or absolute path, e.g. "resources2"tryPolishHomePath - true when the file should also be searched in the polishHomePath
protected File getProjectOrAbsoluteFile(String path,
boolean tryPolishHomePath)
path - the relative or absolute path, e.g. "resources2"tryPolishHomePath - true when the file should also be searched in the polishHomePath
public boolean hasUserDefinedJadAttributesFilter()
public Attribute[] filterJadAttributes(HashMap attributesMap,
BooleanEvaluator evaluator)
attributesMap - a hash map containing the available attributes
with the attribute-names as keys.evaluator - the evaluator for getting the correct filter
NullPointerException - when there is no JAD-attribute filter.public boolean hasUserDefinedManifestAttributesFilter()
public Attribute[] filterManifestAttributes(HashMap attributesMap,
BooleanEvaluator evaluator)
attributesMap - a hash map containing the available attributes
with the attribute-names as keys.evaluator - the boolean evaluator for getting the correct filter
NullPointerException - when there is no MANIFEST-attribute filter.public void setBinaryLibrary(String librariesStr)
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.public void setBinaryLibraries(String librariesStr)
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.public LibrariesSetting createLibraries()
public LibrariesSetting getBinaryLibraries()
public JavaExtension[] getJavaExtensions()
public InputStream openStandardCssAttributes()
BuildException - when the file could not be foundpublic InputStream openCustomCssAttributes()
public String getJavacTarget()
public void setJavacTarget(String javacTarget)
javacTarget - The javac-target to set.public void setCompilerMode(boolean enable)
enable - true when the compiler-mode should be enabled.
The mode is disabled by default.public boolean isInCompilerMode()
public void setCompilerDestDir(File destinationDir)
destinationDir - the target directory for compiled classes.
The default directory is "bin/classes".public File getCompilerDestDir()
public void setCompilerModePreverify(boolean enable)
public boolean doPreverifyInCompilerMode()
public PackageSetting[] getPackageSettings()
public CompilerTask getCompiler(BooleanEvaluator evaluator)
evaluator - the evaluator for boolean conditions
public void setEncoding(String encoding)
encoding - the encoding, defaults to "UTF8"public String getEncoding()
public PreCompilerSetting[] getPreCompilers()
public boolean doPreCompile()
public PostObfuscatorSetting[] getPostObfuscators()
public boolean doPostCompile()
public PostCompilerSetting[] getPostCompilers()
public boolean doPostObfuscate()
public Finalizer[] getFinalizers(ExtensionManager manager,
Environment environment)
manager - environment -
public void setCustomApis(File customApis)
customApis - The customApis to set.public void setCustomDevices(File customDevices)
customDevices - The customDevices to set.public void setCustomConfigurations(File customConfigurations)
customConfigurations - The file containing custom-configurations.xmlpublic void setCustomPlatforms(File customPlatforms)
customPlatforms - The file containing custom-platforms.xmlpublic void setCustomExtensions(File customExtensions)
customExtensions - The customExtensions to set.public File getCustomExtensions()
public void setCustomGroups(File customGroups)
customGroups - The customGroups to set.public void setCustomVendors(File customVendors)
customVendors - The customVendors to set.public PreverifierSetting[] getPreverifierSettings()
public Map getDeviceDatabaseInputStreams()
public Map getDeviceDatabaseFiles()
public boolean replacePropertiesWithoutDirective()
public void setReplacePropertiesWithoutDirective(boolean enable)
public boolean abortOnError()
public void setAbortOnError(boolean abortOnError)
public String getOnError()
public void setOnError(String onError)
public ClassSetting getDojaClassSetting()
public void addConfiguredDoja(ClassSetting setting)
setting - The dojaClassSetting to set.public void addConfiguredIappli(ClassSetting setting)
setting - The dojaClassSetting to set.public ClassSetting getMainClassSetting()
public void addConfiguredMain(ClassSetting setting)
setting - The mainClassSetting to set.public FileSetting getFileSetting()
public ArrayList getSerializers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||