Package com.facebook.buck.cxx
Class CxxTestDescriptionArg
- java.lang.Object
-
- com.facebook.buck.cxx.CxxTestDescriptionArg
-
- All Implemented Interfaces:
BuildRuleArg
,ConstructorArg
,DataTransferObject
,HasContacts
,HasDeclaredDeps
,HasDefaultPlatform
,HasDepsQuery
,HasTests
,HasTestTimeout
,HasDefaultFlavors
,CxxBinaryDescription.CommonArg
,CxxConstructorArg
,LinkableCxxConstructorArg
,HasSystemFrameworkAndLibraries
,HasVersionUniverse
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class CxxTestDescriptionArg extends Object
Immutable implementation ofCxxTestDescription.AbstractCxxTestDescriptionArg
.Use the builder to create immutable instances:
CxxTestDescriptionArg.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CxxTestDescriptionArg.Builder
Builds instances of typeCxxTestDescriptionArg
.
-
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 CxxTestDescriptionArg.Builder
builder()
Creates a builder forCxxTestDescriptionArg
.boolean
equals(Object another)
This instance is equal to all instances ofCxxTestDescriptionArg
that have equal attribute values.com.google.common.collect.ImmutableSet<SourcePath>
getAdditionalCoverageTargets()
com.google.common.collect.ImmutableList<StringWithMacros>
getArgs()
com.google.common.collect.ImmutableList<UnconfiguredBuildTarget>
getCompatibleWith()
A list ofconfig_setting
a target is compatible with.com.google.common.collect.ImmutableList<StringWithMacros>
getCompilerFlags()
com.google.common.collect.ImmutableSortedSet<String>
getContacts()
CxxDeps
getCxxDeps()
Optional<Linker.CxxRuntimeType>
getCxxRuntimeType()
com.google.common.collect.ImmutableSortedSet<Flavor>
getDefaultFlavors()
Optional<Flavor>
getDefaultPlatform()
com.google.common.collect.ImmutableMap<String,Flavor>
getDefaults()
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.common.collect.ImmutableSortedSet<BuildTarget>
getDeps()
Optional<Query>
getDepsQuery()
com.google.common.collect.ImmutableMap<String,StringWithMacros>
getEnv()
Optional<String>
getExecutableName()
boolean
getFatLto()
Optional<com.facebook.buck.cxx.CxxTestType>
getFramework()
com.google.common.collect.ImmutableSortedSet<FrameworkPath>
getFrameworks()
Optional<String>
getHeaderNamespace()
SourceSortedSet
getHeaders()
com.google.common.collect.ImmutableSortedSet<String>
getIncludeDirectories()
A list of include directories to be added to the compile command for compiling this cxx target.com.google.common.collect.ImmutableSortedSet<String>
getLabels()
com.google.common.collect.ImmutableMap<CxxSource.Type,com.google.common.collect.ImmutableList<StringWithMacros>>
getLangCompilerFlags()
com.google.common.collect.ImmutableMap<CxxSource.Type,PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>>
getLangPlatformCompilerFlags()
com.google.common.collect.ImmutableMap<CxxSource.Type,PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>>
getLangPlatformPreprocessorFlags()
com.google.common.collect.ImmutableMap<CxxSource.Type,com.google.common.collect.ImmutableList<StringWithMacros>>
getLangPreprocessorFlags()
com.google.common.collect.ImmutableSortedSet<FrameworkPath>
getLibraries()
com.google.common.collect.ImmutableSet<SourcePath>
getLicenses()
boolean
getLinkDepsQueryWhole()
com.google.common.collect.ImmutableList<String>
getLinkerExtraOutputs()
com.google.common.collect.ImmutableList<StringWithMacros>
getLinkerFlags()
Optional<String>
getLinkGroup()
Defines the link group.Optional<com.google.common.collect.ImmutableList<CxxLinkGroupMapping>>
getLinkGroupMap()
Defines the list of link group mappings.Optional<Linker.LinkableDepType>
getLinkStyle()
String
getName()
Each rule has a namePatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>
getPlatformCompilerFlags()
PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<BuildTarget>>
getPlatformDeps()
PatternMatchedCollection<SourceSortedSet>
getPlatformHeaders()
PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>
getPlatformLinkerFlags()
PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>
getPlatformPreprocessorFlags()
PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<SourceWithFlags>>
getPlatformSrcs()
com.google.common.collect.ImmutableList<StringWithMacros>
getPostLinkerFlags()
PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>
getPostPlatformLinkerFlags()
Optional<SourcePath>
getPrecompiledHeader()
Optional<SourcePath>
getPrefixHeader()
com.google.common.collect.ImmutableList<StringWithMacros>
getPreprocessorFlags()
CxxDeps
getPrivateCxxDeps()
com.google.common.collect.ImmutableSortedSet<SourcePath>
getRawHeaders()
Raw headers are headers which are used as they are (via compilation flags).com.google.common.collect.ImmutableSortedSet<Path>
getResources()
Optional<Boolean>
getRunTestSeparately()
com.google.common.collect.ImmutableSortedSet<SourceWithFlags>
getSrcs()
Optional<Long>
getTestRuleTimeoutMs()
com.google.common.collect.ImmutableSortedSet<BuildTarget>
getTests()
boolean
getThinLto()
Optional<Boolean>
getUseDefaultTestMain()
Optional<String>
getVersionUniverse()
int
hashCode()
Computes a hash code from attributes:framework
,env
,args
,runTestSeparately
,useDefaultTestMain
,resources
,additionalCoverageTargets
,linkDepsQueryWhole
,linkStyle
,linkGroupMap
,linkGroup
,thinLto
,fatLto
,srcs
,platformSrcs
,headers
,rawHeaders
,includeDirectories
,platformHeaders
,prefixHeader
,precompiledHeader
,compilerFlags
,langCompilerFlags
,langPlatformCompilerFlags
,platformCompilerFlags
,preprocessorFlags
,platformPreprocessorFlags
,langPreprocessorFlags
,langPlatformPreprocessorFlags
,linkerFlags
,postLinkerFlags
,linkerExtraOutputs
,platformLinkerFlags
,executableName
,postPlatformLinkerFlags
,platformDeps
,headerNamespace
,cxxRuntimeType
,defaults
,defaultFlavors
,cxxDeps
,privateCxxDeps
,licenses
,labels
,defaultTargetPlatform
,compatibleWith
,name
,deps
,defaultPlatform
,tests
,frameworks
,libraries
,versionUniverse
,depsQuery
,contacts
,testRuleTimeoutMs
.String
toString()
Prints the immutable valueCxxTestDescriptionArg
with attribute values.default CxxTestDescriptionArg
withDepsQuery(Query query)
-
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.cxx.CxxConstructorArg
checkDuplicateSources, checkHeadersUsage
-
-
-
-
Method Detail
-
getFramework
public Optional<com.facebook.buck.cxx.CxxTestType> getFramework()
- Returns:
- The value of the
framework
attribute
-
getEnv
public com.google.common.collect.ImmutableMap<String,StringWithMacros> getEnv()
- Returns:
- The value of the
env
attribute
-
getArgs
public com.google.common.collect.ImmutableList<StringWithMacros> getArgs()
- Returns:
- The value of the
args
attribute
-
getRunTestSeparately
public Optional<Boolean> getRunTestSeparately()
- Returns:
- The value of the
runTestSeparately
attribute
-
getUseDefaultTestMain
public Optional<Boolean> getUseDefaultTestMain()
- Returns:
- The value of the
useDefaultTestMain
attribute
-
getResources
public com.google.common.collect.ImmutableSortedSet<Path> getResources()
- Returns:
- The value of the
resources
attribute
-
getAdditionalCoverageTargets
public com.google.common.collect.ImmutableSet<SourcePath> getAdditionalCoverageTargets()
- Returns:
- The value of the
additionalCoverageTargets
attribute
-
getLinkDepsQueryWhole
public boolean getLinkDepsQueryWhole()
- Specified by:
getLinkDepsQueryWhole
in interfaceCxxBinaryDescription.CommonArg
- Returns:
- The value of the
linkDepsQueryWhole
attribute
-
getLinkStyle
public Optional<Linker.LinkableDepType> getLinkStyle()
- Specified by:
getLinkStyle
in interfaceLinkableCxxConstructorArg
- Returns:
- The value of the
linkStyle
attribute
-
getLinkGroupMap
public Optional<com.google.common.collect.ImmutableList<CxxLinkGroupMapping>> getLinkGroupMap()
Defines the list of link group mappings. Targets' membership in a group is defined by the order of the list, so if more than one mapping matches a single target, the group would be the one defined by the first match.- Specified by:
getLinkGroupMap
in interfaceLinkableCxxConstructorArg
-
getLinkGroup
public Optional<String> getLinkGroup()
Defines the link group. When linking executable code, only static libraries which belong to the same group would be linked into the executable.- Specified by:
getLinkGroup
in interfaceLinkableCxxConstructorArg
-
getThinLto
public boolean getThinLto()
- Specified by:
getThinLto
in interfaceLinkableCxxConstructorArg
- Returns:
- The value of the
thinLto
attribute
-
getFatLto
public boolean getFatLto()
- Specified by:
getFatLto
in interfaceLinkableCxxConstructorArg
- Returns:
- The value of the
fatLto
attribute
-
getSrcs
public com.google.common.collect.ImmutableSortedSet<SourceWithFlags> getSrcs()
- Specified by:
getSrcs
in interfaceCxxConstructorArg
- Returns:
- The value of the
srcs
attribute
-
getPlatformSrcs
public PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<SourceWithFlags>> getPlatformSrcs()
- Specified by:
getPlatformSrcs
in interfaceCxxConstructorArg
- Returns:
- The value of the
platformSrcs
attribute
-
getHeaders
public SourceSortedSet getHeaders()
- Specified by:
getHeaders
in interfaceCxxConstructorArg
- Returns:
- The value of the
headers
attribute
-
getRawHeaders
public com.google.common.collect.ImmutableSortedSet<SourcePath> getRawHeaders()
Raw headers are headers which are used as they are (via compilation flags). Buck doesn't copy them or create symlinks for them. They are public (since managed by compilation flags).- Specified by:
getRawHeaders
in interfaceCxxConstructorArg
- Returns:
- a list of raw headers
-
getIncludeDirectories
public com.google.common.collect.ImmutableSortedSet<String> getIncludeDirectories()
A list of include directories to be added to the compile command for compiling this cxx target.- Specified by:
getIncludeDirectories
in interfaceCxxConstructorArg
- Returns:
- a list of private include paths for this cxx target.
-
getPlatformHeaders
public PatternMatchedCollection<SourceSortedSet> getPlatformHeaders()
- Specified by:
getPlatformHeaders
in interfaceCxxConstructorArg
- Returns:
- The value of the
platformHeaders
attribute
-
getPrefixHeader
public Optional<SourcePath> getPrefixHeader()
- Specified by:
getPrefixHeader
in interfaceCxxConstructorArg
- Returns:
- The value of the
prefixHeader
attribute
-
getPrecompiledHeader
public Optional<SourcePath> getPrecompiledHeader()
- Specified by:
getPrecompiledHeader
in interfaceCxxConstructorArg
- Returns:
- The value of the
precompiledHeader
attribute
-
getCompilerFlags
public com.google.common.collect.ImmutableList<StringWithMacros> getCompilerFlags()
- Specified by:
getCompilerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
compilerFlags
attribute
-
getLangCompilerFlags
public com.google.common.collect.ImmutableMap<CxxSource.Type,com.google.common.collect.ImmutableList<StringWithMacros>> getLangCompilerFlags()
- Specified by:
getLangCompilerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
langCompilerFlags
attribute
-
getLangPlatformCompilerFlags
public com.google.common.collect.ImmutableMap<CxxSource.Type,PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>> getLangPlatformCompilerFlags()
- Specified by:
getLangPlatformCompilerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
langPlatformCompilerFlags
attribute
-
getPlatformCompilerFlags
public PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>> getPlatformCompilerFlags()
- Specified by:
getPlatformCompilerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
platformCompilerFlags
attribute
-
getPreprocessorFlags
public com.google.common.collect.ImmutableList<StringWithMacros> getPreprocessorFlags()
- Specified by:
getPreprocessorFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
preprocessorFlags
attribute
-
getPlatformPreprocessorFlags
public PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>> getPlatformPreprocessorFlags()
- Specified by:
getPlatformPreprocessorFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
platformPreprocessorFlags
attribute
-
getLangPreprocessorFlags
public com.google.common.collect.ImmutableMap<CxxSource.Type,com.google.common.collect.ImmutableList<StringWithMacros>> getLangPreprocessorFlags()
- Specified by:
getLangPreprocessorFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
langPreprocessorFlags
attribute
-
getLangPlatformPreprocessorFlags
public com.google.common.collect.ImmutableMap<CxxSource.Type,PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>>> getLangPlatformPreprocessorFlags()
- Specified by:
getLangPlatformPreprocessorFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
langPlatformPreprocessorFlags
attribute
-
getLinkerFlags
public com.google.common.collect.ImmutableList<StringWithMacros> getLinkerFlags()
- Specified by:
getLinkerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
linkerFlags
attribute
-
getPostLinkerFlags
public com.google.common.collect.ImmutableList<StringWithMacros> getPostLinkerFlags()
- Specified by:
getPostLinkerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
postLinkerFlags
attribute
-
getLinkerExtraOutputs
public com.google.common.collect.ImmutableList<String> getLinkerExtraOutputs()
- Specified by:
getLinkerExtraOutputs
in interfaceCxxConstructorArg
- Returns:
- The value of the
linkerExtraOutputs
attribute
-
getPlatformLinkerFlags
public PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>> getPlatformLinkerFlags()
- Specified by:
getPlatformLinkerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
platformLinkerFlags
attribute
-
getExecutableName
public Optional<String> getExecutableName()
- Specified by:
getExecutableName
in interfaceCxxConstructorArg
- Returns:
- The value of the
executableName
attribute
-
getPostPlatformLinkerFlags
public PatternMatchedCollection<com.google.common.collect.ImmutableList<StringWithMacros>> getPostPlatformLinkerFlags()
- Specified by:
getPostPlatformLinkerFlags
in interfaceCxxConstructorArg
- Returns:
- The value of the
postPlatformLinkerFlags
attribute
-
getPlatformDeps
public PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<BuildTarget>> getPlatformDeps()
- Specified by:
getPlatformDeps
in interfaceCxxConstructorArg
- Returns:
- The value of the
platformDeps
attribute
-
getHeaderNamespace
public Optional<String> getHeaderNamespace()
- Specified by:
getHeaderNamespace
in interfaceCxxConstructorArg
- Returns:
- The value of the
headerNamespace
attribute
-
getCxxRuntimeType
public Optional<Linker.CxxRuntimeType> getCxxRuntimeType()
- Specified by:
getCxxRuntimeType
in interfaceCxxConstructorArg
- Returns:
- The value of the
cxxRuntimeType
attribute
-
getDefaults
public com.google.common.collect.ImmutableMap<String,Flavor> getDefaults()
- Specified by:
getDefaults
in interfaceCxxConstructorArg
- Returns:
- The value of the
defaults
attribute
-
getDefaultFlavors
public com.google.common.collect.ImmutableSortedSet<Flavor> getDefaultFlavors()
- Specified by:
getDefaultFlavors
in interfaceCxxConstructorArg
- Specified by:
getDefaultFlavors
in interfaceHasDefaultFlavors
- Returns:
- The computed-at-construction value of the
defaultFlavors
attribute
-
getCxxDeps
public CxxDeps getCxxDeps()
- Specified by:
getCxxDeps
in interfaceCxxConstructorArg
- Returns:
- the C/C++ deps this rule builds against.
-
getPrivateCxxDeps
public CxxDeps getPrivateCxxDeps()
- Specified by:
getPrivateCxxDeps
in interfaceCxxConstructorArg
- Returns:
- C/C++ deps which are *not* propagated to dependents.
-
getLicenses
public com.google.common.collect.ImmutableSet<SourcePath> getLicenses()
- Specified by:
getLicenses
in interfaceBuildRuleArg
- Returns:
- The value of the
licenses
attribute
-
getLabels
public com.google.common.collect.ImmutableSortedSet<String> getLabels()
- Specified by:
getLabels
in interfaceBuildRuleArg
- Returns:
- The value of the
labels
attribute
-
getDefaultTargetPlatform
public 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.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
-
getCompatibleWith
public com.google.common.collect.ImmutableList<UnconfiguredBuildTarget> getCompatibleWith()
A list ofconfig_setting
a target is compatible with.- Specified by:
getCompatibleWith
in interfaceBuildRuleArg
-
getName
public String getName()
Each rule has a name- Specified by:
getName
in interfaceConstructorArg
-
getDeps
public com.google.common.collect.ImmutableSortedSet<BuildTarget> getDeps()
- Specified by:
getDeps
in interfaceHasDeclaredDeps
- Returns:
- The value of the
deps
attribute
-
getDefaultPlatform
public Optional<Flavor> getDefaultPlatform()
- Specified by:
getDefaultPlatform
in interfaceHasDefaultPlatform
- Returns:
- If present, the default platform with which to build this target if none are provided on the command line.
-
getTests
public com.google.common.collect.ImmutableSortedSet<BuildTarget> getTests()
-
getFrameworks
public com.google.common.collect.ImmutableSortedSet<FrameworkPath> getFrameworks()
- Specified by:
getFrameworks
in interfaceHasSystemFrameworkAndLibraries
- Returns:
- The value of the
frameworks
attribute
-
getLibraries
public com.google.common.collect.ImmutableSortedSet<FrameworkPath> getLibraries()
- Specified by:
getLibraries
in interfaceHasSystemFrameworkAndLibraries
- Returns:
- The value of the
libraries
attribute
-
getVersionUniverse
public Optional<String> getVersionUniverse()
- Specified by:
getVersionUniverse
in interfaceHasVersionUniverse
- Returns:
- The value of the
versionUniverse
attribute
-
getDepsQuery
public Optional<Query> getDepsQuery()
- Specified by:
getDepsQuery
in interfaceHasDepsQuery
- Returns:
- The value of the
depsQuery
attribute
-
getContacts
public com.google.common.collect.ImmutableSortedSet<String> getContacts()
- Specified by:
getContacts
in interfaceHasContacts
- Returns:
- The value of the
contacts
attribute
-
getTestRuleTimeoutMs
public Optional<Long> getTestRuleTimeoutMs()
- Specified by:
getTestRuleTimeoutMs
in interfaceHasTestTimeout
- Returns:
- The value of the
testRuleTimeoutMs
attribute
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofCxxTestDescriptionArg
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:framework
,env
,args
,runTestSeparately
,useDefaultTestMain
,resources
,additionalCoverageTargets
,linkDepsQueryWhole
,linkStyle
,linkGroupMap
,linkGroup
,thinLto
,fatLto
,srcs
,platformSrcs
,headers
,rawHeaders
,includeDirectories
,platformHeaders
,prefixHeader
,precompiledHeader
,compilerFlags
,langCompilerFlags
,langPlatformCompilerFlags
,platformCompilerFlags
,preprocessorFlags
,platformPreprocessorFlags
,langPreprocessorFlags
,langPlatformPreprocessorFlags
,linkerFlags
,postLinkerFlags
,linkerExtraOutputs
,platformLinkerFlags
,executableName
,postPlatformLinkerFlags
,platformDeps
,headerNamespace
,cxxRuntimeType
,defaults
,defaultFlavors
,cxxDeps
,privateCxxDeps
,licenses
,labels
,defaultTargetPlatform
,compatibleWith
,name
,deps
,defaultPlatform
,tests
,frameworks
,libraries
,versionUniverse
,depsQuery
,contacts
,testRuleTimeoutMs
.
-
toString
public String toString()
Prints the immutable valueCxxTestDescriptionArg
with attribute values.
-
builder
public static CxxTestDescriptionArg.Builder builder()
Creates a builder forCxxTestDescriptionArg
.- Returns:
- A new CxxTestDescriptionArg builder
-
withDepsQuery
public default CxxTestDescriptionArg withDepsQuery(Query query)
- Specified by:
withDepsQuery
in interfaceHasDepsQuery
-
-