The Developer Preview for Android 11 is now available; test it out and share your feedback.

TargetConfig

interface TargetConfig<T : Any!>
androidx.camera.core.internal.TargetConfig

Configuration containing options used to identify the target class and object being configured.

Summary

Nested classes

abstract

Builder for a TargetConfig.

Public methods

abstract Class<T>?
getTargetClass(@Nullable valueIfMissing: Class<T>?)

Retrieves the class of the object being configured.

abstract Class<T>

Retrieves the class of the object being configured.

abstract String?
getTargetName(@Nullable valueIfMissing: String?)

Retrieves the name of the target object being configured.

abstract String

Retrieves the name of the target object being configured.

Public methods

getTargetClass

@Nullable abstract fun getTargetClass(@Nullable valueIfMissing: Class<T>?): Class<T>?

Retrieves the class of the object being configured.

Parameters
valueIfMissing Class<T>?: The value to return if this configuration option has not been set.
Return
Class<T>?: The stored value or valueIfMissing if the value does not exist in this configuration.

getTargetClass

@NonNull abstract fun getTargetClass(): Class<T>

Retrieves the class of the object being configured.

Return
Class<T>: The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.

getTargetName

@Nullable abstract fun getTargetName(@Nullable valueIfMissing: String?): String?

Retrieves the name of the target object being configured.

The name should be a value that can uniquely identify an instance of the object being configured.

Parameters
valueIfMissing String?: The value to return if this configuration option has not been set.
Return
String?: The stored value or valueIfMissing if the value does not exist in this configuration.

getTargetName

@NonNull abstract fun getTargetName(): String

Retrieves the name of the target object being configured.

The name should be a value that can uniquely identify an instance of the object being configured.

Return
String: The stored value, if it exists in this configuration.
Exceptions
IllegalArgumentException if the option does not exist in this configuration.