Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ivy.util
Class Configurator

    java.lang.Object
      org.apache.ivy.util.Configurator

    public class Configurator

extends java.lang.Object

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
`static class` | `Configurator.Attribute`
`static class` | `Configurator.Element`
`static class` | `Configurator.Macro`
`static class` | `Configurator.MacroDef`
`static class` | `Configurator.MacroRecord`

Constructor Summary
`Configurator()`

Method Summary
`void` | `addChild(java.lang.String name, java.lang.Object child)`
`void` | `addConfiguredMacrodef(Configurator.MacroDef macrodef)`
`void` | `addMacroAttribute(java.lang.String attName, java.lang.String attDefaultValue)`
`void` | `addMacroElement(java.lang.String elementName, boolean optional)`
`void` | `addText(java.lang.String text)`
`void` | `clear()`
`java.lang.Object` | `endCreateChild()`
`void` | `endMacroDef()`
`java.lang.Object` | `getCurrent()`
`int` | `getDepth()`
`FileResolver` | `getFileResolver()`
`java.lang.Class` | `getTypeDef(java.lang.String name)`
`boolean` | `isTopLevelMacroRecord()`
`void` | `setAttribute(java.lang.String attributeName, java.lang.String value)`
`void` | `setFileResolver(FileResolver fileResolver)`
`void` | `setRoot(java.lang.Object root)`
`java.lang.Object` | `startCreateChild(java.lang.String name)`
`Configurator.MacroDef` | `startMacroDef(java.lang.String macroName)`
`void` | `typeDef(java.lang.String name, java.lang.Class clazz)`
`void` | `typeDef(java.lang.String name, java.lang.String className)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Configurator

    public Configurator()

Method Detail

### typeDef

    public void typeDef(java.lang.String name,
                        java.lang.String className)
                 throws java.lang.ClassNotFoundException

  Throws:
    `java.lang.ClassNotFoundException`

### typeDef

    public void typeDef(java.lang.String name,
                        java.lang.Class clazz)

### setRoot

    public void setRoot(java.lang.Object root)

### clear

    public void clear()

### startCreateChild

    public java.lang.Object startCreateChild(java.lang.String name)

### addChild

    public void addChild(java.lang.String name,
                         java.lang.Object child)

### isTopLevelMacroRecord

    public boolean isTopLevelMacroRecord()

### setAttribute

    public void setAttribute(java.lang.String attributeName,
                             java.lang.String value)

### addText

    public void addText(java.lang.String text)

### endCreateChild

    public java.lang.Object endCreateChild()

  Returns:
    the finished child

### getCurrent

    public java.lang.Object getCurrent()

### getDepth

    public int getDepth()

### startMacroDef

    public Configurator.MacroDef startMacroDef(java.lang.String macroName)

### addMacroAttribute

    public void addMacroAttribute(java.lang.String attName,
                                  java.lang.String attDefaultValue)

### addMacroElement

    public void addMacroElement(java.lang.String elementName,
                                boolean optional)

### endMacroDef

    public void endMacroDef()

### addConfiguredMacrodef

    public void addConfiguredMacrodef(Configurator.MacroDef macrodef)

### getTypeDef

    public java.lang.Class getTypeDef(java.lang.String name)

### getFileResolver

    public FileResolver getFileResolver()

### setFileResolver

    public void setFileResolver(FileResolver fileResolver)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD