Stay organized with collections
Save and categorize content based on your preferences.
InspectionCompanionProvider
public
interface
InspectionCompanionProvider
android.view.inspector.InspectionCompanionProvider
|
Known indirect subclasses
|
An interface for services that can provide inspection companions for a class.
Summary
Public methods
provide
public abstract InspectionCompanion<T> provide (Class<T> cls)
Provide an InspectionCompanion
for the supplied class.
Implementing classes must not cache companion instances, and should instantiate a new one
for each request.
Parameters |
cls |
Class : A Class representing the inspectable type
This value cannot be null . |
Returns |
InspectionCompanion<T> |
The inspection companion for the supplied type
This value may be null . |
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,["# InspectionCompanionProvider\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \n\nInspectionCompanionProvider\n===========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/view/inspector/InspectionCompanionProvider \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nInspectionCompanionProvider\n`\n\n\n`\n\n\n`\n\n|----------------------------------------------------|\n| android.view.inspector.InspectionCompanionProvider |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [StaticInspectionCompanionProvider](/reference/android/view/inspector/StaticInspectionCompanionProvider) |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | [StaticInspectionCompanionProvider](/reference/android/view/inspector/StaticInspectionCompanionProvider) | An inspection companion provider that finds companions as inner classes or generated code. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn interface for services that can provide inspection companions for a class.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract \u003cT\u003e `[InspectionCompanion](/reference/android/view/inspector/InspectionCompanion)`\u003cT\u003e` | ` `[provide](/reference/android/view/inspector/InspectionCompanionProvider#provide(java.lang.Class\u003cT\u003e))`(`[Class](/reference/java/lang/Class)`\u003cT\u003e cls) ` Provide an [InspectionCompanion](/reference/android/view/inspector/InspectionCompanion) for the supplied class. |\n\nPublic methods\n--------------\n\n### provide\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract InspectionCompanion\u003cT\u003e provide (Class\u003cT\u003e cls)\n```\n\nProvide an [InspectionCompanion](/reference/android/view/inspector/InspectionCompanion) for the supplied class.\n\nImplementing classes must not cache companion instances, and should instantiate a new one\nfor each request.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|----------------------------------------------------------------------------------------------------------------------|\n| `cls` | `Class`: A [Class](/reference/java/lang/Class) representing the inspectable type This value cannot be `null`. \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [InspectionCompanion](/reference/android/view/inspector/InspectionCompanion)`\u003cT\u003e` | The inspection companion for the supplied type This value may be `null`. \u003cbr /\u003e |"]]