Class SearchPathIncludeResolver

java.lang.Object
io.github.protasm.jvmud.compiler.preproc.SearchPathIncludeResolver
All Implemented Interfaces:
IncludeResolver

public final class SearchPathIncludeResolver extends Object implements IncludeResolver
Include resolver that searches a configurable list of system include roots.
  • Constructor Details

    • SearchPathIncludeResolver

      public SearchPathIncludeResolver(Path baseIncludePath, List<Path> systemIncludePaths)
  • Method Details

    • resolve

      public IncludeResolution resolve(Path includingFile, String includePath, boolean system) throws IOException
      Description copied from interface: IncludeResolver
      Resolve an include path to source text.
      Specified by:
      resolve in interface IncludeResolver
      Parameters:
      includingFile - absolute or virtual path of the including fileName (may be null for roots)
      includePath - the raw string inside #include "..." or #include <...>
      system - true for #include <...>, false for #include "..."
      Returns:
      the loaded source text
      Throws:
      IOException - if not found or unreadable