|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jplate.kvp.parser.impl.defaults.DefaultKvpMapBuilder
public class DefaultKvpMapBuilder
Kvp builder that constructs Map
's containing String name/value pairs.
Modifications: $Date: 2008-12-02 12:32:45 -0500 (Tue, 02 Dec 2008) $ $Revision: 479 $ $Author: sfloess $ $HeadURL: https://jplate.svn.sourceforge.net/svnroot/jplate/trunk/src/dev/java/org/jplate/kvp/parser/impl/defaults/DefaultKvpMapBuilder.java $
Field Summary | |
---|---|
private org.apache.commons.logging.Log |
_log
Used for logging. |
private MapFactoryIfc<java.lang.String,java.lang.String> |
_mapFactory
Used to create Map's. |
private java.util.Map<java.lang.String,java.lang.String> |
_mapResult
Holds the result. |
Constructor Summary | |
---|---|
DefaultKvpMapBuilder()
Default constructor. |
|
DefaultKvpMapBuilder(MapFactoryIfc<java.lang.String,java.lang.String> mapFactory)
This constructor sets the map factory that is use to hold name/value pairs. |
Method Summary | |
---|---|
void |
buildEnd(int line,
int column)
This method is called when parsing has completed. |
void |
buildKeyValuePair(KvpParseContextIfc parseContext)
This method is called when key / value pairs have been parsed. |
void |
buildStart()
This method is called when parsing is to begin. |
java.util.Map<java.lang.String,java.lang.String> |
getResult()
Return the built object. |
void |
reset()
Reset any result currently held. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final MapFactoryIfc<java.lang.String,java.lang.String> _mapFactory
private java.util.Map<java.lang.String,java.lang.String> _mapResult
private final transient org.apache.commons.logging.Log _log
Constructor Detail |
---|
public DefaultKvpMapBuilder(MapFactoryIfc<java.lang.String,java.lang.String> mapFactory)
mapFactory
- Factory to create a map that will be used to hold the
name/value pairs.public DefaultKvpMapBuilder()
UnsynchronizedHashMapFactory
.
Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.String> getResult()
getResult
in interface BuilderIfc<java.util.Map<java.lang.String,java.lang.String>>
public void reset()
reset
in interface BuilderIfc<java.util.Map<java.lang.String,java.lang.String>>
public void buildStart() throws JPlateBuildingException
buildStart
in interface JPlateBuilderIfc<java.util.Map<java.lang.String,java.lang.String>>
JPlateBuildingException
public void buildEnd(int line, int column) throws JPlateBuildingException
buildEnd
in interface JPlateBuilderIfc<java.util.Map<java.lang.String,java.lang.String>>
line
- The line where parsing ended.column
- The column number where parsing ended.
JPlateBuildingException
public void buildKeyValuePair(KvpParseContextIfc parseContext) throws JPlateBuildingException
buildKeyValuePair
in interface KvpBuilderIfc<java.util.Map<java.lang.String,java.lang.String>>
parseContext
- contains data about the parsed key/value pair.
JPlateBuildingException
- If there is a problem building the key /
value pair.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |