public class JavaBinary extends AbstractBuildRuleWithDeclaredAndExtraDeps implements BinaryBuildRule, HasClasspathDeps, HasClasspathEntries, HasRuntimeDeps
| Constructor and Description |
|---|
JavaBinary(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams params,
Tool javaRuntimeLauncher,
String mainClass,
SourcePath manifestFile,
boolean mergeManifests,
boolean disallowAllDuplicates,
Path metaInfDirectory,
com.google.common.collect.ImmutableSet<Pattern> blacklist,
com.google.common.collect.ImmutableSet<JavaLibrary> transitiveClasspathDeps,
com.google.common.collect.ImmutableSet<SourcePath> transitiveClasspaths,
boolean cache,
Level duplicatesLogLevel) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<Step> |
getBuildSteps(BuildContext context,
BuildableContext buildableContext) |
Set<BuildRule> |
getDepsForTransitiveClasspathEntries() |
Tool |
getExecutableCommand(OutputLabel outputLabel)
Command to execute the output of this rule.
|
com.google.common.collect.ImmutableSet<SourcePath> |
getImmediateClasspaths()
Returns the classpaths for only this rule, not its deps.
|
com.google.common.collect.ImmutableSet<SourcePath> |
getOutputClasspaths() |
java.util.stream.Stream<BuildTarget> |
getRuntimeDeps(BuildRuleResolver buildRuleResolver) |
SourcePath |
getSourcePathToOutput() |
com.google.common.collect.ImmutableSet<JavaLibrary> |
getTransitiveClasspathDeps() |
com.google.common.collect.ImmutableSet<SourcePath> |
getTransitiveClasspaths() |
boolean |
isCacheable()
Whether this
BuildRule can be cached. |
deprecatedGetExtraDeps, getBuildDeps, getDeclaredDeps, getTargetGraphOnlyDepsequals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, toString, updateBuildRuleResolverclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTo, getBuildDeps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolvergetDependencies, getSourcePathOutputsgetTypepublic JavaBinary(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params, Tool javaRuntimeLauncher, @Nullable String mainClass, @Nullable SourcePath manifestFile, boolean mergeManifests, boolean disallowAllDuplicates, @Nullable Path metaInfDirectory, com.google.common.collect.ImmutableSet<Pattern> blacklist, com.google.common.collect.ImmutableSet<JavaLibrary> transitiveClasspathDeps, com.google.common.collect.ImmutableSet<SourcePath> transitiveClasspaths, boolean cache, Level duplicatesLogLevel)
public com.google.common.collect.ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps in interface BuildRulepublic com.google.common.collect.ImmutableSet<SourcePath> getTransitiveClasspaths()
getTransitiveClasspaths in interface HasClasspathEntriesjavac's -classpath flag
in order to build a jar associated with this rule.public com.google.common.collect.ImmutableSet<JavaLibrary> getTransitiveClasspathDeps()
getTransitiveClasspathDeps in interface HasClasspathEntriespublic com.google.common.collect.ImmutableSet<SourcePath> getImmediateClasspaths()
HasClasspathEntriesUsed to generate the value of HasClasspathEntries.getTransitiveClasspaths().
getImmediateClasspaths in interface HasClasspathEntriespublic com.google.common.collect.ImmutableSet<SourcePath> getOutputClasspaths()
getOutputClasspaths in interface HasClasspathEntriesjavac's
-classpath flag in order to compile rules that depend on this rule. This is a
superset of getImmediateClasspaths which also contains the classpath entries of any
exported deps.public SourcePath getSourcePathToOutput()
getSourcePathToOutput in interface BuildRulepublic Tool getExecutableCommand(OutputLabel outputLabel)
BinaryBuildRulegetExecutableCommand in interface BinaryBuildRuleoutputLabel - associated with the executablepublic boolean isCacheable()
BuildRuleBuildRule can be cached.
Uncached build rules are never written out to cache, never read from cache, and does not count in cache statistics. This rule is useful for artifacts which cannot be easily normalized.
Uncached rules are not always rebuilt, however, as long as the existing on-disk
representation is up to date. This means that these rules can take advantage of SupportsInputBasedRuleKey to prevent rebuilding.
isCacheable in interface BuildEngineActionisCacheable in interface BuildRuleisCacheable in class AbstractBuildRulepublic Set<BuildRule> getDepsForTransitiveClasspathEntries()
getDepsForTransitiveClasspathEntries in interface HasClasspathDepspublic java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps in interface HasRuntimeDeps