Package com.facebook.buck.features.js
Class JsBundleGenruleDescriptionArg
- java.lang.Object
-
- com.facebook.buck.features.js.JsBundleGenruleDescriptionArg
-
- All Implemented Interfaces:
BuildRuleArg
,ConstructorArg
,DataTransferObject
,HasTests
,HasBundleName
,AbstractGenruleDescription.CommonArg
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class JsBundleGenruleDescriptionArg extends Object
Immutable implementation ofJsBundleGenruleDescription.AbstractJsBundleGenruleDescriptionArg
.Use the builder to create immutable instances:
JsBundleGenruleDescriptionArg.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsBundleGenruleDescriptionArg.Builder
Builds instances of typeJsBundleGenruleDescriptionArg
.
-
Field Summary
-
Fields inherited from interface com.facebook.buck.core.description.arg.BuildRuleArg
DEFAULT_TARGET_PLATFORM_PARAM_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description static JsBundleGenruleDescriptionArg.Builder
builder()
Creates a builder forJsBundleGenruleDescriptionArg
.boolean
equals(Object another)
This instance is equal to all instances ofJsBundleGenruleDescriptionArg
that have equal attribute values.Optional<StringWithMacros>
getBash()
Optional<String>
getBundleName()
The name of the bundle.com.google.common.collect.ImmutableList<Pair<Flavor,String>>
getBundleNameForFlavor()
A mapping from flavors to bundle names.Optional<Boolean>
getCacheable()
This functionality only exists to get around the lack of extensibility in our current build rule / build file apis.Optional<StringWithMacros>
getCmd()
Optional<StringWithMacros>
getCmdExe()
com.google.common.collect.ImmutableList<UnconfiguredBuildTarget>
getCompatibleWith()
A list ofconfig_setting
a target is compatible with.Optional<UnconfiguredBuildTarget>
getDefaultTargetPlatform()
The name of build target default "new" platform: it is used when a platform is not specified either globally or in a target which used this target as a dependency.Optional<Boolean>
getEnableSandbox()
Optional<String>
getEnvironmentExpansionSeparator()
BuildTarget
getJsBundle()
com.google.common.collect.ImmutableSortedSet<String>
getLabels()
com.google.common.collect.ImmutableSet<SourcePath>
getLicenses()
String
getName()
Each rule has a namedefault String
getOut()
Optional<Boolean>
getRemote()
If present and true, requests that Buck run this genrule remotely if possible.boolean
getRewriteDepsFile()
boolean
getRewriteMisc()
boolean
getRewriteSourcemap()
boolean
getSkipResources()
SourceSet
getSrcs()
com.google.common.collect.ImmutableSortedSet<BuildTarget>
getTests()
default Optional<String>
getType()
int
hashCode()
Computes a hash code from attributes:jsBundle
,rewriteSourcemap
,rewriteMisc
,skipResources
,rewriteDepsFile
,bash
,cacheable
,cmd
,cmdExe
,enableSandbox
,environmentExpansionSeparator
,remote
,srcs
,needAndroidTools
,compatibleWith
,defaultTargetPlatform
,labels
,licenses
,name
,tests
,bundleName
,bundleNameForFlavor
.boolean
isNeedAndroidTools()
This argument allows genrule to specify if it needs android tools (like dex, aapt, ndk, sdk).String
toString()
Prints the immutable valueJsBundleGenruleDescriptionArg
with attribute values.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.facebook.buck.core.description.arg.BuildRuleArg
labelsContainsAnyOf
-
Methods inherited from interface com.facebook.buck.features.js.HasBundleName
computeBundleName
-
-
-
-
Method Detail
-
getJsBundle
public BuildTarget getJsBundle()
- Returns:
- The value of the
jsBundle
attribute
-
getRewriteSourcemap
public boolean getRewriteSourcemap()
- Returns:
- The value of the
rewriteSourcemap
attribute
-
getRewriteMisc
public boolean getRewriteMisc()
- Returns:
- The value of the
rewriteMisc
attribute
-
getSkipResources
public boolean getSkipResources()
- Returns:
- The value of the
skipResources
attribute
-
getRewriteDepsFile
public boolean getRewriteDepsFile()
- Returns:
- The value of the
rewriteDepsFile
attribute
-
getBash
public Optional<StringWithMacros> getBash()
- Specified by:
getBash
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
bash
attribute
-
getCacheable
public Optional<Boolean> getCacheable()
Description copied from interface:AbstractGenruleDescription.CommonArg
This functionality only exists to get around the lack of extensibility in our current build rule / build file apis. It may go away at some point. Also, make sure that you understand whatBuildRule.isCacheable()
does with respect to caching if you decide to use this attribute- Specified by:
getCacheable
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
cacheable
attribute
-
getCmd
public Optional<StringWithMacros> getCmd()
- Specified by:
getCmd
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
cmd
attribute
-
getCmdExe
public Optional<StringWithMacros> getCmdExe()
- Specified by:
getCmdExe
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
cmdExe
attribute
-
getEnableSandbox
public Optional<Boolean> getEnableSandbox()
- Specified by:
getEnableSandbox
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
enableSandbox
attribute
-
getEnvironmentExpansionSeparator
public Optional<String> getEnvironmentExpansionSeparator()
- Specified by:
getEnvironmentExpansionSeparator
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
environmentExpansionSeparator
attribute
-
getRemote
public Optional<Boolean> getRemote()
Description copied from interface:AbstractGenruleDescription.CommonArg
If present and true, requests that Buck run this genrule remotely if possible. Defaults to false for now.- Specified by:
getRemote
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
remote
attribute
-
getSrcs
public SourceSet getSrcs()
- Specified by:
getSrcs
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
srcs
attribute
-
isNeedAndroidTools
public boolean isNeedAndroidTools()
Description copied from interface:AbstractGenruleDescription.CommonArg
This argument allows genrule to specify if it needs android tools (like dex, aapt, ndk, sdk).- Specified by:
isNeedAndroidTools
in interfaceAbstractGenruleDescription.CommonArg
- Returns:
- The value of the
needAndroidTools
attribute
-
getCompatibleWith
public com.google.common.collect.ImmutableList<UnconfiguredBuildTarget> getCompatibleWith()
Description copied from interface:BuildRuleArg
A list ofconfig_setting
a target is compatible with.- Specified by:
getCompatibleWith
in interfaceBuildRuleArg
- Returns:
- The value of the
compatibleWith
attribute
-
getDefaultTargetPlatform
public Optional<UnconfiguredBuildTarget> getDefaultTargetPlatform()
Description copied from interface:BuildRuleArg
The name of build target default "new" platform: it is used when a platform is not specified either globally or in a target which used this target as a dependency.The value is a build target, but we specify it as string, because this function is not actually called, but the attr is fetched by name from the raw (unconfigured) target node.
- Specified by:
getDefaultTargetPlatform
in interfaceBuildRuleArg
- Returns:
- The value of the
defaultTargetPlatform
attribute
-
getLabels
public com.google.common.collect.ImmutableSortedSet<String> getLabels()
- Specified by:
getLabels
in interfaceBuildRuleArg
- Returns:
- The value of the
labels
attribute
-
getLicenses
public com.google.common.collect.ImmutableSet<SourcePath> getLicenses()
- Specified by:
getLicenses
in interfaceBuildRuleArg
- Returns:
- The value of the
licenses
attribute
-
getName
public String getName()
Description copied from interface:ConstructorArg
Each rule has a name- Specified by:
getName
in interfaceConstructorArg
- Returns:
- The value of the
name
attribute
-
getTests
public com.google.common.collect.ImmutableSortedSet<BuildTarget> getTests()
-
getBundleName
public Optional<String> getBundleName()
The name of the bundle.- Specified by:
getBundleName
in interfaceHasBundleName
-
getBundleNameForFlavor
public com.google.common.collect.ImmutableList<Pair<Flavor,String>> getBundleNameForFlavor()
A mapping from flavors to bundle names.- Specified by:
getBundleNameForFlavor
in interfaceHasBundleName
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofJsBundleGenruleDescriptionArg
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:jsBundle
,rewriteSourcemap
,rewriteMisc
,skipResources
,rewriteDepsFile
,bash
,cacheable
,cmd
,cmdExe
,enableSandbox
,environmentExpansionSeparator
,remote
,srcs
,needAndroidTools
,compatibleWith
,defaultTargetPlatform
,labels
,licenses
,name
,tests
,bundleName
,bundleNameForFlavor
.
-
toString
public String toString()
Prints the immutable valueJsBundleGenruleDescriptionArg
with attribute values.
-
builder
public static JsBundleGenruleDescriptionArg.Builder builder()
Creates a builder forJsBundleGenruleDescriptionArg
.- Returns:
- A new JsBundleGenruleDescriptionArg builder
-
getOut
public default String getOut()
-
getType
public default Optional<String> getType()
- Specified by:
getType
in interfaceAbstractGenruleDescription.CommonArg
-
-