|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.io.Ant
public class Ant
A little helper class to retrieve Data from ANT-files.
For some reasons the placeholders in the java-tags are not expanded, which
means that we'll do it ourselves.
Field Summary | |
---|---|
static java.lang.String |
ARG
the name of argument-tag |
static java.lang.String |
CLASSNAME
the name of the attribute for the Java class |
static java.lang.String |
JAVA
the name of java-tag |
static java.lang.String |
VALUE
the name of the attribute for the value |
Constructor Summary | |
---|---|
Ant(java.io.File file)
initializes the object |
|
Ant(java.lang.String filename)
initializes the object |
Method Summary | |
---|---|
java.lang.String |
expand(java.lang.String arg)
expands the properties in the given String and returns the expanded version |
java.util.Vector |
expand(java.util.Vector args)
expands the properties in the given Vector and returns the expanded version |
java.util.Vector |
getAntTargets()
returns all targets as AntTarget-Instances |
java.util.Vector |
getAntTargets(CluderInterface cluder)
returns the targets that fit the In/Excluder as AntTarget-Instances. |
java.util.Vector |
getArguments(org.apache.tools.ant.Task task)
returns all the arguments (if any) from the given Java-task, NULL if not found (automatically expanded!) |
java.lang.String |
getClassname(org.apache.tools.ant.Task task)
returns the classname of the given Java-task, NULL if not found (automatically expanded) |
java.lang.String |
getFilename()
returns the filename of the current ANT file, can be NULL |
java.util.Vector |
getJavaTasks(java.lang.String target)
returns all the java calls of the given target, NULL if not found |
java.lang.String |
getName()
returns the name of the project, NULL if not set |
org.apache.tools.ant.Project |
getProject()
returns the Project instance |
java.util.Vector |
getProperties()
returns the names of all the Properties in the ANT file |
java.util.Vector |
getProperties(CluderInterface cluder)
returns the names of all the Properties in the ANT file, that match the given Cluder (Includer/Excluder) |
java.lang.String |
getProperty(java.lang.String property)
returns the value of the given property, NULL if not found |
org.apache.tools.ant.Target |
getTarget(java.lang.String target)
retrieves the given Target, NULL if not found |
java.util.Vector |
getTargets()
returns the names of all the targets in the ANT file |
java.util.Vector |
getTargets(CluderInterface cluder)
returns the names of all the targets in the ANT file, that fullfil the Cluder (Includer/Excluder) |
java.util.Vector |
getTasks(java.lang.String target)
returns the Tasks of the given target, NULL if not found |
boolean |
isLoaded()
returns whether the ANT file was loaded correctly |
static void |
main(java.lang.String[] args)
for testing only |
boolean |
reload()
tries to reload the ANT file |
void |
setProperty(java.lang.String property,
java.lang.String value)
sets the value of the given property (must already exist!) |
java.lang.String |
toString()
returns part of the ANT file in a string representation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASSNAME
public static final java.lang.String VALUE
public static final java.lang.String JAVA
public static final java.lang.String ARG
Constructor Detail |
---|
public Ant(java.lang.String filename)
filename
- the ANT-file to analyzepublic Ant(java.io.File file)
file
- the ANT-file to analyzeMethod Detail |
---|
public java.lang.String getFilename()
public boolean isLoaded()
public boolean reload()
public java.lang.String getName()
public org.apache.tools.ant.Project getProject()
public org.apache.tools.ant.Target getTarget(java.lang.String target)
public java.util.Vector getTargets()
public java.util.Vector getTargets(CluderInterface cluder)
public java.util.Vector getAntTargets()
AntTarget
public java.util.Vector getAntTargets(CluderInterface cluder)
AntTarget
public void setProperty(java.lang.String property, java.lang.String value)
public java.lang.String getProperty(java.lang.String property)
public java.util.Vector getProperties()
public java.util.Vector getProperties(CluderInterface cluder)
public java.util.Vector getTasks(java.lang.String target)
Task
public java.lang.String expand(java.lang.String arg)
public java.util.Vector expand(java.util.Vector args)
public java.util.Vector getJavaTasks(java.lang.String target)
public java.lang.String getClassname(org.apache.tools.ant.Task task)
public java.util.Vector getArguments(org.apache.tools.ant.Task task)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |