|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
it.haefelinger.flaka.Task
it.haefelinger.flaka.DotClassPath
public class DotClassPath
A task to execute operations on a .classpath loc. This task implements opertations like append, remove and query on a .classpath loc.
| Nested Class Summary | |
|---|---|
class |
DotClassPath.ClassPathEntry
A class representing a "real" classpathentry element. |
class |
DotClassPath.FileSetEntry
To be used to create a list of 'lib->path' entries |
static interface |
DotClassPath.LogicalClassPathEntry
Interface representing a logical classpath entry. |
| Field Summary | |
|---|---|
static int |
AND
|
protected File |
base
my base folder |
protected boolean |
echo
dump content |
protected File |
file
the loc to operate on |
protected List |
list
internal list of (logical) classpath entries |
protected int |
logic
query logic |
protected char |
opc
operation |
static int |
OR
|
protected String |
qvar
query result var |
protected String |
refid
dependencies to be used |
protected boolean |
sort
sort content |
protected File |
wsfolder
Eclipse's workspace |
| Fields inherited from class it.haefelinger.flaka.Task |
|---|
debug, el |
| Fields inherited from class org.apache.tools.ant.Task |
|---|
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
DotClassPath()
|
|
| Method Summary | |
|---|---|
void |
addFileSet(FileSet item)
|
protected static void |
attr2buf(StringBuffer buf,
String v,
String name)
A helper function to add an XML like attribute to a string buffer. |
protected File |
basedir()
Returns current base folder given by property basedir. |
protected void |
collect(Element root,
List bucket)
Iterates of each child element of root, turing each into a classpath entry and adding such an entry to bucket. |
protected boolean |
contains(List Q,
DotClassPath.ClassPathEntry c)
|
DotClassPath.ClassPathEntry |
createClassPathEntry()
|
protected void |
eval(List bucket)
Iterates over each logical classpath entries and evaluates each entry into a physical entries. |
void |
execute()
|
protected boolean |
good(DotClassPath.ClassPathEntry c)
Check whether this classpath entry is acceptable for Eclipse. |
protected void |
opQuery(List clazzpath)
|
protected void |
opRemove(List clazzpath)
|
protected void |
opUpdate(List clazzpath)
* Update XML element by adding classpath entries. |
void |
setBase(File file)
Use this attribute to specify the base directory. |
void |
setEcho(boolean b)
Use this attribute to dump the content of the .classpath loc on stdout. |
void |
setFile(File file)
Use this attribute to set the loc to operate on. |
void |
setFlush(boolean b)
Deprecated. |
void |
setLogic(String s)
Use this attribute to specify the query logic. |
void |
setOp(String s)
Use this attribute to specify the operation to execute. |
void |
setRefId(String s)
Use attribute refid to specify another variable holding an array of Dependencies. |
void |
setResDir(String s)
|
void |
setSort(boolean b)
Use this attribute to sort the final .classpath. |
void |
setSrcDir(String s)
|
void |
setUnique(boolean b)
Deprecated. |
void |
setValidate(boolean b)
Deprecated. |
void |
setVar(String s)
This attribute will be set if a query evaluates to true. |
void |
setWsFolder(File file)
Use this attribute to specify the workspace folder of Eclipse. |
String |
toString()
This method will render a string representation of all physical classpath entries. |
protected void |
update(DotClassPath.ClassPathEntry c,
Element e)
|
| Methods inherited from class it.haefelinger.flaka.Task |
|---|
debug, debug, error, error, getProperty, getref, info, log, setDebug, setEl, throwbx, throwbx, toFile, verbose, warn, warn |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected List list
protected File file
protected File base
protected File wsfolder
protected boolean sort
protected char opc
protected boolean echo
protected String qvar
protected String refid
protected int logic
public static final int AND
public static final int OR
| Constructor Detail |
|---|
public DotClassPath()
| Method Detail |
|---|
public void setLogic(String s)
s - Shall not be null. The string value will be normalized, then
tested for the following values in a case insensitive manner:
"and", "&" and "&&" equals to logical and, while "or","|" or "||"
gives the logical or. If the given values does not match, the
default value gets applied.public void setRefId(String s)
s - null allowedpublic void setVar(String s)
s - The name of the property to set if a query evaluates to true.public void setEcho(boolean b)
b - If true, dump the content of .classpath.public void setOp(String s)
s - public void setFile(File file)
public void setBase(File file)
public void setWsFolder(File file)
public void setSort(boolean b)
public void setUnique(boolean b)
b - public void setValidate(boolean b)
b - public void setFlush(boolean b)
b - public void setSrcDir(String s)
s - public void setResDir(String s)
s -
protected static void attr2buf(StringBuffer buf,
String v,
String name)
buf - not nullname - (attribute name)v - (attribute value)
public DotClassPath.ClassPathEntry createClassPathEntry()
throws BuildException
BuildExceptionprotected File basedir()
public void addFileSet(FileSet item)
throws BuildException
BuildExceptionprotected void eval(List bucket)
public String toString()
toString in class Object
protected void collect(Element root,
List bucket)
protected void update(DotClassPath.ClassPathEntry c,
Element e)
protected boolean good(DotClassPath.ClassPathEntry c)
c - not null
protected boolean contains(List Q,
DotClassPath.ClassPathEntry c)
protected void opUpdate(List clazzpath)
throws BuildException
BuildException
protected void opQuery(List clazzpath)
throws BuildException
BuildException
protected void opRemove(List clazzpath)
throws BuildException
BuildException
public void execute()
throws BuildException
execute in class TaskBuildException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||