Interface ModelineParser

All Known Implementing Classes:
JBangModelineParser

public interface ModelineParser
Modeline parser
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Is the given source code line a modeline?
    List<org.apache.camel.spi.CamelContextCustomizer>
    parse(org.apache.camel.spi.Resource resource)
    Parses the resource to detect modelines
  • Method Details

    • isModeline

      boolean isModeline(String line)
      Is the given source code line a modeline?
      Parameters:
      line - the source code line
      Returns:
      true if modeline, false if not
    • parse

      List<org.apache.camel.spi.CamelContextCustomizer> parse(org.apache.camel.spi.Resource resource) throws Exception
      Parses the resource to detect modelines
      Parameters:
      resource - the source code resource
      Returns:
      list of CamelContextCustomizer customizers that processes the modelines
      Throws:
      Exception - is thrown if error during parsing