public abstract class ForwardingProjectBuildFileParserDecorator extends Object implements ProjectBuildFileParser
ProjectBuildFileParser
that forwards all method invocation to
the delegate.
This decorator makes it easy to write decorators that are supposed to modify the behavior of a
subset of ProjectBuildFileParser
methods.
Modifier and Type | Field and Description |
---|---|
protected ProjectBuildFileParser |
delegate |
Modifier | Constructor and Description |
---|---|
protected |
ForwardingProjectBuildFileParserDecorator(ProjectBuildFileParser delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
com.google.common.collect.ImmutableSortedSet<String> |
getIncludedFiles(Path buildFile)
Collects the loaded files and extensions when parsing the
parseFile build spec. |
BuildFileManifest |
getManifest(Path buildFile)
Collect all information from a particular, along with metadata about the information, for
example which other files were also parsed.
|
boolean |
globResultsMatchCurrentState(Path buildFile,
com.google.common.collect.ImmutableList<GlobSpecWithResult> existingGlobsWithResults)
Checks if existing
GlobSpec s with results are the same as current state in the file
system. |
void |
reportProfile()
Reports profile information captured while parsing build files.
|
protected final ProjectBuildFileParser delegate
protected ForwardingProjectBuildFileParserDecorator(ProjectBuildFileParser delegate)
public BuildFileManifest getManifest(Path buildFile) throws BuildFileParseException, InterruptedException, IOException
FileParser
getManifest
in interface FileParser<BuildFileManifest>
buildFile
- should be an absolute path to a file. Must have rootPath as its prefix.BuildFileParseException
InterruptedException
IOException
public void reportProfile() throws IOException
ProjectBuildFileParser
reportProfile
in interface ProjectBuildFileParser
IOException
public com.google.common.collect.ImmutableSortedSet<String> getIncludedFiles(Path buildFile) throws BuildFileParseException, InterruptedException, IOException
FileParser
parseFile
build spec.getIncludedFiles
in interface FileParser<BuildFileManifest>
buildFile
- should be an absolute path to a file. Must have rootPath as its prefix.BuildFileParseException
InterruptedException
IOException
public boolean globResultsMatchCurrentState(Path buildFile, com.google.common.collect.ImmutableList<GlobSpecWithResult> existingGlobsWithResults) throws IOException, InterruptedException
ProjectBuildFileParser
GlobSpec
s with results are the same as current state in the file
system.globResultsMatchCurrentState
in interface ProjectBuildFileParser
buildFile
- the buildFile location to be used by the Globber.existingGlobsWithResults
- the existing (deserialized) GlobSpecWithResult
to check
the file system state against.true
if glob expansion produces results matching previously recorded ones,
false
otherwise.IOException
InterruptedException
public void close() throws BuildFileParseException, InterruptedException, IOException
close
in interface FileParser<BuildFileManifest>
close
in interface AutoCloseable
BuildFileParseException
InterruptedException
IOException