|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.common.util.Configuration
public final class Configuration
This class is used to specify the configuration of the parser. It implements the singleton pattern, thus allowing only a single instance to be created per virtual machine. Currently supports two modes of use:
| Method Summary | |
|---|---|
void |
addFlagProcessor(FlagProcessor flag)
Add a flag processor to the configuration |
void |
addHandler(java.lang.String type,
Handler handler)
Add a handler to the configuration |
void |
addPreProcessor(PreProcessor pre)
Add a visitor to the configuration |
void |
addVisitor(Visitor visitor)
Add a visitor to the configuration |
java.util.List<FlagProcessor> |
getFlagProcessors()
Get the set of flag processor for a given type |
java.util.List<Handler> |
getHandlers(java.lang.String type)
Get the set of handlers for a given type |
static Configuration |
getInstance()
Creates a new default (empty) configuration. |
static Configuration |
getInstance(java.lang.String resource)
Creates a resource based configuration |
java.util.List<PreProcessor> |
getPreProcessors()
Get the set of visitors for a given type |
java.lang.String |
getSetting(java.lang.String name)
Accessor that returns a setting that was specified in the configuration. |
java.util.List<Visitor> |
getVisitors()
Get the set of visitors for a given type |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Configuration getInstance()
public static Configuration getInstance(java.lang.String resource)
resource - the uri of the resource
public void addHandler(java.lang.String type,
Handler handler)
type - the type of handlerhandler - the handler objectpublic java.util.List<Handler> getHandlers(java.lang.String type)
type - the type of handler required
public void addVisitor(Visitor visitor)
visitor - the visitor objectpublic java.util.List<Visitor> getVisitors()
public void addPreProcessor(PreProcessor pre)
pre - the preprocessor objectpublic java.util.List<PreProcessor> getPreProcessors()
public java.lang.String getSetting(java.lang.String name)
name - the name of the setting
public void addFlagProcessor(FlagProcessor flag)
flag - the flag processor objectpublic java.util.List<FlagProcessor> getFlagProcessors()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||