Class AntFilesLocator

All Implemented Interfaces:
ISourceFileLocator

class AntFilesLocator extends InputStreamSourceFileLocator
Source locator based on Ant file resources.
  • Field Details

    • resources

      private final Map<String,org.apache.tools.ant.types.Resource> resources
  • Constructor Details

    • AntFilesLocator

      public AntFilesLocator(String encoding, int tabWidth)
  • Method Details

    • add

      void add(org.apache.tools.ant.types.Resource file)
      Adds the given file resource as a potential source file.
      Parameters:
      file - file resource to add
    • getSourceStream

      protected InputStream getSourceStream(String path) throws IOException
      Description copied from class: InputStreamSourceFileLocator
      Tries to locate the given source file and opens its binary content.
      Specified by:
      getSourceStream in class InputStreamSourceFileLocator
      Parameters:
      path - local path to the resource
      Returns:
      stream if the file could be located, null otherwise
      Throws:
      IOException - in case of problems while opening the stream