Returns the type of content that the stream represents.
Even though this may return only RESOURCES or 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.
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.
a set of one or more scopes, never null nor empty.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# QualifiedContent\n================\n\n\n```\ninterface QualifiedContent\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[DirectoryInput](/reference/tools/gradle-api/8.0/com/android/build/api/transform/DirectoryInput), [JarInput](/reference/tools/gradle-api/8.0/com/android/build/api/transform/JarInput) \n\n|--------------------------------------------------------------------------------------------------|-----------------------------------|\n| [DirectoryInput](/reference/tools/gradle-api/8.0/com/android/build/api/transform/DirectoryInput) | **This interface is deprecated.** |\n| [JarInput](/reference/tools/gradle-api/8.0/com/android/build/api/transform/JarInput) | **This interface is deprecated.** |\n\n*** ** * ** ***\n\n| **This interface is deprecated.** \n\nRepresent content qualified with one or more [ContentType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.ContentType) and one or more [Scope](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.Scope).\n\nSummary\n-------\n\n| ### Nested types ||\n|--------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|\n| [QualifiedContent.ContentType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.ContentType) | A content type that is requested through the transform API. |\n| [QualifiedContent.DefaultContentType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.DefaultContentType) | The type of of the content. |\n| [QualifiedContent.Scope](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.Scope) | The scope of the content. |\n| [QualifiedContent.ScopeType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.ScopeType) | Definition of a scope. |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[QualifiedContent.ContentType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.ContentType)`!\u003e!` | [getContentTypes](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent#getContentTypes())`()` Returns the type of content that the stream represents. |\n| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`!` | [getFile](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent#getFile())`()` Returns he location of the content. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!` | [getName](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent#getName())`()` Returns the name of the content. |\n| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!\u003e!` | [getScopes](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent#getScopes())`()` Returns the scope of the content. |\n\nPublic functions\n----------------\n\n### getContentTypes\n\n```\nfun getContentTypes(): (Mutable)Set\u003cQualifiedContent.ContentType!\u003e!\n```\n\nReturns the type of content that the stream represents.\n\nEven though this may return only [RESOURCES](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.DefaultContentType#RESOURCES) or [CLASSES](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.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.\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| Returns ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|\n| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[QualifiedContent.ContentType](/reference/tools/gradle-api/8.0/com/android/build/api/transform/QualifiedContent.ContentType)`!\u003e!` | a set of one or more types, never null nor empty. |\n\n### getFile\n\n```\nfun getFile(): File!\n```\n\nReturns he location of the content. \n\n| Returns ||\n|-------------------------------------------------------------------------------------------|-----------------------|\n| [File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`!` | the content location. |\n\n### getName\n\n```\nfun 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| Returns ||\n|-------------------------------------------------------------------------------------|----------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!` | the name |\n\n### getScopes\n\n```\nfun getScopes(): (Mutable)Set\u003cAny!\u003e!\n```\n\nReturns the scope of the content. \n\n| Returns ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| `(`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`)`[Set](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`\u003c`[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`!\u003e!` | a set of one or more scopes, never null nor empty. |"]]