com.springsource.util.parser.manifest.internal
Class StandardVisitor
java.lang.Object
com.springsource.util.parser.manifest.internal.StandardVisitor
- All Implemented Interfaces:
- ManifestVisitor, ManifestContents
public class StandardVisitor
- extends java.lang.Object
- implements ManifestVisitor, ManifestContents
Concurrent Semantics
This class is thread safe.
- Author:
- Andy Clement
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
version
private java.lang.String version
mainAttributes
private java.util.Map<java.lang.String,java.lang.String> mainAttributes
otherSectionNames
private java.util.List<java.lang.String> otherSectionNames
otherSectionAttributes
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> otherSectionAttributes
currentAttributes
private java.util.Map<java.lang.String,java.lang.String> currentAttributes
terminateAfterMainSection
protected boolean terminateAfterMainSection
StandardVisitor
public StandardVisitor()
visitManifestVersion
public void visitManifestVersion(java.lang.String version)
- Specified by:
visitManifestVersion
in interface ManifestVisitor
visitHeader
public void visitHeader(java.lang.String name,
java.lang.String value)
- Specified by:
visitHeader
in interface ManifestVisitor
getSectionNames
public java.util.List<java.lang.String> getSectionNames()
- Specified by:
getSectionNames
in interface ManifestVisitor
- Specified by:
getSectionNames
in interface ManifestContents
- Returns:
- the section names discovered during the visit
visitSection
public boolean visitSection(boolean isMain,
java.lang.String name)
- Specified by:
visitSection
in interface ManifestVisitor
- Parameters:
isMain
- or notname
- of section
- Returns:
- true if parsing should continue
getVersion
public java.lang.String getVersion()
- Specified by:
getVersion
in interface ManifestVisitor
- Specified by:
getVersion
in interface ManifestContents
- Returns:
- the version number discovered during the visit
getMainAttributes
public java.util.Map<java.lang.String,java.lang.String> getMainAttributes()
- Specified by:
getMainAttributes
in interface ManifestVisitor
- Specified by:
getMainAttributes
in interface ManifestContents
- Returns:
- the main attributes discovered during the visit
getAttributesForSection
public java.util.Map<java.lang.String,java.lang.String> getAttributesForSection(java.lang.String sectionName)
- Specified by:
getAttributesForSection
in interface ManifestVisitor
- Specified by:
getAttributesForSection
in interface ManifestContents
- Returns:
- the attributes discovered for a particular section during the visit
setTerminateAfterMainSection
public void setTerminateAfterMainSection(boolean b)
- Description copied from interface:
ManifestVisitor
- Force the parsing to finish once the main section is completed (ignoring
the rest of the data)
- Specified by:
setTerminateAfterMainSection
in interface ManifestVisitor
- Parameters:
b
- true if parsing should finish after the main
section is visited
getManifestContents
public ManifestContents getManifestContents()
- Specified by:
getManifestContents
in interface ManifestVisitor
- Returns:
- the contents of the manifested as constructed during the visit