public abstract class ParsingContext extends Object
Note that some of the objects in this context may not be used during all of the requests. For
this reason this context is created using a builder pattern where only necessary parameters are
passed. Some of the parameters are mandatory and they must be passed to the builder()
method.
Modifier and Type | Class and Description |
---|---|
static class |
ParsingContext.Builder |
Constructor and Description |
---|
ParsingContext() |
Modifier and Type | Method and Description |
---|---|
static ParsingContext.Builder |
builder(Cell cell,
com.google.common.util.concurrent.ListeningExecutorService executor) |
boolean |
enableTargetCompatibilityChecks() |
boolean |
excludeUnsupportedTargets()
Whether targets with constraints that are not compatible with the target platform should be
excluded.
|
ParserConfig.ApplyDefaultFlavorsMode |
getApplyDefaultFlavorsMode()
Controls how flavors are appended to the build targets.
|
abstract Cell |
getCell()
Cell for which the parsing request is performed
|
abstract com.google.common.util.concurrent.ListeningExecutorService |
getExecutor()
An executor used during parsing request to perform async computations
|
SpeculativeParsing |
getSpeculativeParsing()
Whether speculative parsing is enabled.
|
boolean |
isProfilingEnabled()
Whether to enable profiling during parsing request.
|
boolean |
useUnconfiguredSelectorResolver() |
ParsingContext |
withApplyDefaultFlavorsMode(ParserConfig.ApplyDefaultFlavorsMode value) |
ParsingContext |
withCell(Cell value) |
ParsingContext |
withExcludeUnsupportedTargets(boolean value) |
ParsingContext |
withSpeculativeParsing(SpeculativeParsing value) |
ParsingContext |
withUseUnconfiguredSelectorResolver(boolean value) |
public abstract Cell getCell()
public abstract com.google.common.util.concurrent.ListeningExecutorService getExecutor()
@Value.Default public boolean isProfilingEnabled()
@Value.Default public SpeculativeParsing getSpeculativeParsing()
Speculative parsing a special mode of parsing when dependencies of a target are scheduled for parsing ahead of the actual requests for parsing of those targets. This may lead to over-parsing is some case and thus needs to be used in situations when all of the dependencies of requested targets are used later.
@Value.Default public boolean excludeUnsupportedTargets()
@Value.Default public ParserConfig.ApplyDefaultFlavorsMode getApplyDefaultFlavorsMode()
ParserConfig.ApplyDefaultFlavorsMode
@Value.Default public boolean enableTargetCompatibilityChecks()
@Value.Default public boolean useUnconfiguredSelectorResolver()
public final ParsingContext withCell(Cell value)
public final ParsingContext withSpeculativeParsing(SpeculativeParsing value)
public final ParsingContext withExcludeUnsupportedTargets(boolean value)
public final ParsingContext withApplyDefaultFlavorsMode(ParserConfig.ApplyDefaultFlavorsMode value)
public final ParsingContext withUseUnconfiguredSelectorResolver(boolean value)
public static ParsingContext.Builder builder(Cell cell, com.google.common.util.concurrent.ListeningExecutorService executor)