Package org.apache.ivy.util
Class Configurator
java.lang.Object
org.apache.ivy.util.Configurator
Ant 1.6.1 like Configurator
This configurator is used to configure elements (initialised with setRoot) using the behaviour defined by ant for its tasks.
Example (based on Ant Example):
Configurator conf = new Configurator(); conf.typeDef("buildpath", "Sample$BuildPath"); conf.typeDef("xinterface", "Sample$XInterface"); Sample.MyFileSelector mfs = new Sample.MyFileSelector(); conf.setRoot(mfs); conf.startCreateChild("buildpath"); conf.setAttribute("path", "."); conf.setAttribute("url", "abc"); conf.startCreateChild("xinterface"); conf.setAttribute("count", "4"); conf.endCreateChild(); // xinterface conf.endCreateChild(); // buildpath
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addConfiguredMacrodef
(Configurator.MacroDef macrodef) void
addMacroAttribute
(String attName, String attDefaultValue) void
addMacroElement
(String elementName, boolean optional) void
void
clear()
void
int
getDepth()
Class<?>
getTypeDef
(String name) boolean
void
setAttribute
(String attributeName, String value) void
setFileResolver
(FileResolver fileResolver) void
startCreateChild
(String name) startMacroDef
(String macroName) void
void
-
Constructor Details
-
Configurator
public Configurator()
-
-
Method Details
-
typeDef
- Throws:
ClassNotFoundException
-
typeDef
-
setRoot
-
clear
public void clear() -
startCreateChild
-
addChild
-
isTopLevelMacroRecord
public boolean isTopLevelMacroRecord() -
setAttribute
-
addText
-
endCreateChild
- Returns:
- the finished child
-
getCurrent
-
getDepth
public int getDepth() -
startMacroDef
-
addMacroAttribute
-
addMacroElement
-
endMacroDef
public void endMacroDef() -
addConfiguredMacrodef
-
getTypeDef
-
getFileResolver
-
setFileResolver
-