Stay organized with collections
Save and categorize content based on your preferences.
QualifiedContent
interface QualifiedContent
Represent content qualified with one or more ContentType
and one or more Scope
.
Summary
Nested classes
|
abstract |
A content type that is requested through the transform API.
|
|
The type of of the content.
|
|
The scope of the content.
|
abstract |
Definition of a scope.
|
Public methods
getContentTypes
@NonNull abstract fun getContentTypes(): MutableSet<QualifiedContent.ContentType!>
Returns the type of content that the stream represents.
Even though this may return only DefaultContentType#RESOURCES
or DefaultContentType#CLASSES
, the actual content (the folder or the jar) may contain files representing other content types. This is because the transform mechanism avoids duplicating files around to remove unwanted types for performance.
For each input, transforms should always take care to read and process only the files associated with the types returned by this method.
getFile
@NonNull abstract fun getFile(): File
Returns he location of the content.
Return |
File: the content location. |
getName
@NonNull abstract fun getName(): String
Returns the name of the content. Can be used to differentiate different content using the same scope. This is not reliably usable at every stage of the transformations, but can be used for logging for instance.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# QualifiedContent\n================\n\n```\ninterface QualifiedContent\n```\n\n|-------------------------------------------------------|\n| [com.android.build.api.transform.QualifiedContent](#) |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [DirectoryInput](/reference/tools/gradle-api/7.1/com/android/build/api/transform/DirectoryInput), [JarInput](/reference/tools/gradle-api/7.1/com/android/build/api/transform/JarInput) |--------------------------------------------------------------------------------------------------|--------------------------------------------| | [DirectoryInput](/reference/tools/gradle-api/7.1/com/android/build/api/transform/DirectoryInput) | A [QualifiedContent](#) of type directory. | | [JarInput](/reference/tools/gradle-api/7.1/com/android/build/api/transform/JarInput) | A [QualifiedContent](#) of type jar. | |\n\nRepresent content qualified with one or more [ContentType](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.ContentType) and one or more [Scope](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.Scope).\n\nSummary\n-------\n\n| ### Nested classes ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract | [ContentType](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.ContentType) A content type that is requested through the transform API. |\n| | [DefaultContentType](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.DefaultContentType) The type of of the content. |\n| | [Scope](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.Scope) The scope of the content. |\n| abstract | [ScopeType](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.ScopeType) Definition of a scope. |\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| abstract [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\\\u003c[QualifiedContent.ContentType](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.ContentType)!\\\u003e | [getContentTypes](#getContentTypes())`()` Returns the type of content that the stream represents. |\n| abstract [File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html) | [getFile](#getFile())`()` Returns he location of the content. |\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](#getName())`()` Returns the name of the content. |\n| abstract [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\\\u003cin [QualifiedContent.Scope](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.Scope)!\\\u003e | [getScopes](#getScopes())`()` Returns the scope of the content. |\n\nPublic methods\n--------------\n\n### getContentTypes\n\n```\n@NonNull abstract fun getContentTypes(): MutableSet\u003cQualifiedContent.ContentType!\u003e\n```\n\nReturns the type of content that the stream represents.\n\nEven though this may return only [DefaultContentType#RESOURCES](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.DefaultContentType) or [DefaultContentType#CLASSES](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.DefaultContentType), the actual content (the folder or the jar) may contain files representing other content types. This is because the transform mechanism avoids duplicating files around to remove unwanted types for performance.\n\nFor each input, transforms should always take care to read and process only the files associated with the types returned by this method.\n\n| Return ||\n|---|---|\n| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\\\u003c[QualifiedContent.ContentType](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.ContentType)!\\\u003e: a set of one or more types, never null nor empty. ||\n\n### getFile\n\n```\n@NonNull abstract fun getFile(): File\n```\n\nReturns he location of the content.\n\n| Return ||\n|---|---|\n| [File](http://docs.oracle.com/javase/8/docs/api/java/io/File.html): the content location. ||\n\n### getName\n\n```\n@NonNull abstract fun getName(): String\n```\n\nReturns the name of the content. Can be used to differentiate different content using the same scope. This is not reliably usable at every stage of the transformations, but can be used for logging for instance.\n\n| Return ||\n|---|---|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): the name ||\n\n### getScopes\n\n```\n@NonNull abstract fun getScopes(): MutableSet\u003cin QualifiedContent.Scope!\u003e\n```\n\nReturns the scope of the content.\n\n| Return ||\n|---|---|\n| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\\\u003cin [QualifiedContent.Scope](/reference/tools/gradle-api/7.1/com/android/build/api/transform/QualifiedContent.Scope)!\\\u003e: a set of one or more scopes, never null nor empty. ||"]]