com.vaadin.flow.component.internal.

Class HtmlImportParser


  • public class HtmlImportParser
    extends Object

    Helper for finding the HTML imports of a resource.

    Since:

    1.2

    Author:

    Vaadin Ltd

    • Method Detail

      • parseImports

        public static void parseImports(String resourcePath,
                                        Function<String,InputStream> getResourceAsStream,
                                        Function<String,String> resolveResource,
                                        Consumer<String> importHandler)

        Parses the contents of the given resource and passes any found HTML imports to the given consumer.

        Parameters:

        resourcePath - the path of the resource from which to fin

        getResourceAsStream - a callback for opening an input stream with the contents of the given resource

        resolveResource - a callback that resolves the given resource path

        importHandler - the callback to which found HTML imports should be passed