Package org.ec4j.core.parser
Interface EditorConfigHandler
- All Known Implementing Classes:
AbstractValidatingHandler,EditorConfigModelHandler,LocationAwareModelHandler,ValidatingHandler
public interface EditorConfigHandler
A handler that gets notified about parse events from
EditorConfigParser.parse(Resource, EditorConfigHandler, ErrorHandler) .
Implementations will generally want to keep some internal state and therefore their instances should not be accessed from concurrent threads.
The implementations should still allow the use case when the same EditorConfigHandler instance is used for
parsing multiple .editorconfig files sequentially one after another.
All event notifications methods have ParseContext parameter which can be used to query the current
Location in the parsed file or for getting the parsed file via ParseContext.getResource().
-
Method Summary
Modifier and TypeMethodDescriptionvoidblankLine(ParseContext context) A blank linevoidendComment(ParseContext context, String comment) End of a comment linevoidendDocument(ParseContext context) End of a document eventvoidendGlob(ParseContext context, String glob) End of a glob patternvoidendProperty(ParseContext context) End of a propertyvoidendPropertyName(ParseContext context, String name) End of a property namevoidendPropertyValue(ParseContext context, String value) Start of a property namevoidendSection(ParseContext context) End of a sectionvoidstartComment(ParseContext context) Start of a comment linevoidstartDocument(ParseContext context) Start of a document eventvoidstartGlob(ParseContext context) Start of a glob patternvoidstartProperty(ParseContext context) Start of a propertyvoidstartPropertyName(ParseContext context) Start of a property namevoidstartPropertyValue(ParseContext context) Start of a property valuevoidstartSection(ParseContext context) Start of a section
-
Method Details
-
startDocument
Start of a document event- Parameters:
context- theParseContext
-
endDocument
End of a document event- Parameters:
context- theParseContext
-
startSection
Start of a section- Parameters:
context- theParseContext
-
endSection
End of a section- Parameters:
context- theParseContext
-
startGlob
Start of a glob pattern- Parameters:
context- theParseContext
-
endGlob
End of a glob pattern- Parameters:
context- theParseContextglob- the glob that ends
-
startProperty
Start of a property- Parameters:
context- theParseContext
-
endProperty
End of a property- Parameters:
context- theParseContext
-
startPropertyName
Start of a property name- Parameters:
context- theParseContext
-
endPropertyName
End of a property name- Parameters:
context- theParseContextname- the name
-
startPropertyValue
Start of a property value- Parameters:
context- theParseContext
-
endPropertyValue
Start of a property name- Parameters:
context- theParseContextvalue- the value
-
startComment
Start of a comment line- Parameters:
context- theParseContext
-
endComment
End of a comment line- Parameters:
context- theParseContextcomment- the comment text
-
blankLine
A blank line- Parameters:
context- theParseContext
-