de.enough.polish
Class ExtensionSetting

java.lang.Object
  extended by de.enough.polish.ant.ConditionalElement
      extended by de.enough.polish.ant.Setting
          extended by de.enough.polish.ExtensionSetting
Direct Known Subclasses:
BuildListenerExtensionSetting, DebuggerSetting, EmulatorSetting, FinalizerSetting, LogHandlerSetting, ObfuscatorSetting, PackageSetting, PostCompilerSetting, PostObfuscatorSetting, PreCompilerSetting, PreprocessorSetting, PreverifierSetting, ResourceCopierSetting

public class ExtensionSetting
extends Setting

Extends the possibilities of the Setting by allowing the setting of a class name and a classpath.

Copyright Enough Software 2005

 history
        04-Apr-2005 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
protected  String className
           
protected  org.apache.tools.ant.types.Path classPath
           
protected  String name
           
protected  String target
           
 
Constructor Summary
ExtensionSetting()
          Creates a new setting.
 
Method Summary
 String getClassName()
           
 org.apache.tools.ant.types.Path getClassPath()
           
 String getName()
           
 Variable getParameter(String parameterName, Environment environment)
          Retrieves the defined parameter.
 String getTarget()
           
 void setClass(String className)
          Sets the classname of the extension.
 void setClassPath(org.apache.tools.ant.types.Path classPath)
           
 void setName(String name)
           
 void setTarget(String target)
          Sets the <antcall> target of this extension.
 
Methods inherited from class de.enough.polish.ant.Setting
addConfiguredParameter, getAllParameters, getParameters, hasParameters
 
Methods inherited from class de.enough.polish.ant.ConditionalElement
getCondition, getIf, getUnless, isActive, isActive, isActive, isActive, setIf, setUnless
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

className

protected String className

classPath

protected org.apache.tools.ant.types.Path classPath

target

protected String target
Constructor Detail

ExtensionSetting

public ExtensionSetting()
Creates a new setting.

Method Detail

setClass

public void setClass(String className)
Sets the classname of the extension.

Parameters:
className - the class name

getClassName

public String getClassName()

setClassPath

public void setClassPath(org.apache.tools.ant.types.Path classPath)

getClassPath

public org.apache.tools.ant.types.Path getClassPath()

getName

public String getName()

setName

public void setName(String name)

getTarget

public String getTarget()

setTarget

public void setTarget(String target)
Sets the <antcall> target of this extension.

Parameters:
target - the Ant target that should be called

getParameter

public Variable getParameter(String parameterName,
                             Environment environment)
Retrieves the defined parameter.

Parameters:
parameterName - the name of the parameter
environment - the environment, is used for finding out whether the parameter is active. When the environment is null, the first match is returned.
Returns:
the parameter or null when none is found.