|
terp - the ANT Tasks v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemesh.terp.ant.compiler.AbstractCompilerOption<CppCompiler>
com.codemesh.terp.ant.compiler.cpp.GenericOption
public class GenericOption
A generic option has its value directly included. You should only use generic options if you know what you're doing and if the compiler task does not provide an abstract interface for specifying the switch that you need to pass to the compiler.
The GenericOption is the ultimate escape hatch as far as compiler switches are concerned.
| Field Summary | |
|---|---|
protected java.util.List<CompilerPhase> |
phases
|
protected java.util.List<java.lang.String> |
values
|
| Constructor Summary | |
|---|---|
GenericOption()
|
|
GenericOption(CompilerPhase phase,
java.lang.String... values)
|
|
| Method Summary | |
|---|---|
void |
addCommands(java.util.List<java.lang.String> commandList,
CppCompiler compiler,
CompilerPhase phase)
Adds the compiler switches repreesnted by this option to the list of switches. |
void |
addValue(java.lang.String value)
Adds a value to the list of switches represented by this option. |
boolean |
appliesTo(CppCompiler compiler,
CompilerPhase phase)
Returns true if this compiler option applies to the given compiler and compiler phase. |
void |
setPhase(java.lang.String phase)
Sets the phase to which this option applies to. |
void |
setValues(java.util.List<java.lang.String> values)
Sets the option(s) that are added to the compiler commandline if this instance is enabled. |
void |
setValues(java.lang.String values)
Sets the option(s) that are added to the compiler commandline if this instance is enabled. |
| Methods inherited from class com.codemesh.terp.ant.compiler.AbstractCompilerOption |
|---|
expand, expand, getIf, getProject, getUnless, quoteIfNecessary, satisfies, setIf, setProject, setUnless |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<java.lang.String> values
protected java.util.List<CompilerPhase> phases
| Constructor Detail |
|---|
public GenericOption()
public GenericOption(CompilerPhase phase,
java.lang.String... values)
| Method Detail |
|---|
public void setPhase(java.lang.String phase)
phase - the compilation phases to which the option applies.public void setValues(java.lang.String values)
values - the space-separated compiler switches represented by this option.setValues(List)public void setValues(java.util.List<java.lang.String> values)
values - the compiler switches represented by this option.setValues(String)public void addValue(java.lang.String value)
value - a compiler switch.
public void addCommands(java.util.List<java.lang.String> commandList,
CppCompiler compiler,
CompilerPhase phase)
This method is called by the compiler repeatedly with different values for the compiler phase to account for these possibilities.
commandList - the list to which the compiler switches represented
by this option (if any) are added.compiler - the compiler for which we're doing this.phase - the compiler phase in wihch we're doing this.
public boolean appliesTo(CppCompiler compiler,
CompilerPhase phase)
compiler - the compiler for which we're asking.phase - the compiler phase we're executing.
|
terp - the ANT Tasks v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||