Class JBangModelineParser

java.lang.Object
org.apache.camel.dsl.modeline.JBangModelineParser
All Implemented Interfaces:
ModelineParser

public class JBangModelineParser extends Object implements ModelineParser
  • Field Details

  • Constructor Details

    • JBangModelineParser

      public JBangModelineParser()
  • Method Details

    • parse

      public List<org.apache.camel.spi.CamelContextCustomizer> parse(org.apache.camel.spi.Resource resource) throws Exception
      Description copied from interface: ModelineParser
      Parses the resource to detect modelines
      Specified by:
      parse in interface ModelineParser
      Parameters:
      resource - the source code resource
      Returns:
      list of CamelContextCustomizer customizers that processes the modelines
      Throws:
      Exception - is thrown if error during parsing
    • isModeline

      public boolean isModeline(String line)
      Description copied from interface: ModelineParser
      Is the given source code line a modeline?
      Specified by:
      isModeline in interface ModelineParser
      Parameters:
      line - the source code line
      Returns:
      true if modeline, false if not
    • parse

      protected List<org.apache.camel.spi.CamelContextCustomizer> parse(String line)