public class SkylarkDescriptionArg extends Object implements SkylarkDescriptionArgBuilder, BuildRuleArg
DEFAULT_TARGET_PLATFORM_PARAM_NAME| Constructor and Description |
|---|
SkylarkDescriptionArg(SkylarkUserDefinedRule rule)
Create an instance of
SkylarkDescriptionArg |
| Modifier and Type | Method and Description |
|---|---|
void |
build()
'Build' the
SkylarkDescriptionArg. |
com.google.common.collect.ImmutableMap<String,ParamInfo<?>> |
getAllParamInfo() |
com.google.common.collect.ImmutableList<UnconfiguredBuildTarget> |
getCompatibleWith()
A list of
config_setting a target is compatible with. |
com.google.common.collect.ImmutableSortedSet<String> |
getContacts() |
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.
|
com.google.devtools.build.lib.syntax.BaseFunction |
getImplementation() |
com.google.common.collect.ImmutableSortedSet<String> |
getLabels() |
com.google.common.collect.ImmutableSet<SourcePath> |
getLicenses() |
String |
getName()
Each rule has a name
|
Object |
getPostCoercionValue(String attr)
Get an attribute's value after it was set in
SkylarkDescriptionArgBuilder.setPostCoercionValue(String, Object) |
SkylarkUserDefinedRule |
getRule()
Get the
SkylarkDescriptionArg that has information about parameters and the user's
implementation function |
void |
setPostCoercionValue(String attr,
Object value)
Set the value for a specific attribute after it has been successfully coerced/type checked.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlabelsContainsAnyOfpublic SkylarkDescriptionArg(SkylarkUserDefinedRule rule)
SkylarkDescriptionArgrule - the rule that should be used to determine acceptable attributes for a target, and
to provide access to the user's implementation functionpublic void setPostCoercionValue(String attr, Object value)
SkylarkDescriptionArgBuilderSkylarkUserDefinedRulesetPostCoercionValue in interface SkylarkDescriptionArgBuilderattr - The attribute to set the value forvalue - The value to set. Must not be null.public Object getPostCoercionValue(String attr)
SkylarkDescriptionArgBuilderSkylarkDescriptionArgBuilder.setPostCoercionValue(String, Object)
It is an error to get an attribute that has not been set.
getPostCoercionValue in interface SkylarkDescriptionArgBuilderattr - The attribute to get the value forpublic void build()
SkylarkDescriptionArg. After this has been called, setPostCoercionValue(String, Object) may not be called.public SkylarkUserDefinedRule getRule()
SkylarkDescriptionArg that has information about parameters and the user's
implementation functionpublic String getName()
ConstructorArggetName in interface ConstructorArgpublic Optional<UnconfiguredBuildTarget> getDefaultTargetPlatform()
BuildRuleArgThe 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.
getDefaultTargetPlatform in interface BuildRuleArgpublic com.google.common.collect.ImmutableMap<String,ParamInfo<?>> getAllParamInfo()
public com.google.devtools.build.lib.syntax.BaseFunction getImplementation()
public com.google.common.collect.ImmutableSet<SourcePath> getLicenses()
getLicenses in interface BuildRuleArgpublic com.google.common.collect.ImmutableSortedSet<String> getLabels()
getLabels in interface BuildRuleArgpublic com.google.common.collect.ImmutableSortedSet<String> getContacts()
public com.google.common.collect.ImmutableList<UnconfiguredBuildTarget> getCompatibleWith()
BuildRuleArgconfig_setting a target is compatible with.getCompatibleWith in interface BuildRuleArg