Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/view/inspector/InspectionCompanionProvider#pubmethods)

# InspectionCompanionProvider

*** ** * ** ***

` public interface InspectionCompanionProvider `   
` `

|---|
| android.view.inspector.InspectionCompanionProvider |

Known indirect subclasses [StaticInspectionCompanionProvider](https://developer.android.com/reference/android/view/inspector/StaticInspectionCompanionProvider) [StaticInspectionCompanionProvider](https://developer.android.com/reference/android/view/inspector/StaticInspectionCompanionProvider) An inspection companion provider that finds companions as inner classes or generated code.   

*** ** * ** ***

An interface for services that can provide inspection companions for a class.

## Summary

| ### Public methods ||
|---|---|
| ` abstract <T> https://developer.android.com/reference/android/view/inspector/InspectionCompanion<T>` | ` https://developer.android.com/reference/android/view/inspector/InspectionCompanionProvider#provide(java.lang.Class<T>)(https://developer.android.com/reference/java/lang/Class<T> cls) ` Provide an `https://developer.android.com/reference/android/view/inspector/InspectionCompanion` for the supplied class. |

## Public methods

### provide

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract InspectionCompanion<T> provide (Class<T> cls)
```

Provide an `https://developer.android.com/reference/android/view/inspector/InspectionCompanion` for the supplied class. Implementing classes must not cache companion instances, and should instantiate a new one for each request.

<br />

| Parameters ||
|---|---|
| `cls` | `Class`: A `https://developer.android.com/reference/java/lang/Class` representing the inspectable type. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inspector/InspectionCompanion<T>` | The inspection companion for the supplied type. This value may be `null`. <br /> |