AppComponentFactory
public
class
AppComponentFactory
extends Object
| java.lang.Object | |
| ↳ | android.app.AppComponentFactory |
Interface used to control the instantiation of manifest elements.
See also:
Summary
Public constructors | |
|---|---|
AppComponentFactory()
|
|
Public methods | |
|---|---|
Activity
|
instantiateActivity(ClassLoader cl, String className, Intent intent)
Allows application to override the creation of activities. |
Application
|
instantiateApplication(ClassLoader cl, String className)
Allows application to override the creation of the application object. |
ContentProvider
|
instantiateProvider(ClassLoader cl, String className)
Allows application to override the creation of providers. |
BroadcastReceiver
|
instantiateReceiver(ClassLoader cl, String className, Intent intent)
Allows application to override the creation of receivers. |
Service
|
instantiateService(ClassLoader cl, String className, Intent intent)
Allows application to override the creation of services. |
Inherited methods | |
|---|---|
Public constructors
Public methods
instantiateActivity
public Activity instantiateActivity (ClassLoader cl, String className, Intent intent)
Allows application to override the creation of activities. This can be used to perform things such as dependency injection or class loader changes to these classes.
This method is only intended to provide a hook for instantiation. It does not provide earlier access to the Activity object. The returned object will not be initialized as a Context yet and should not be used to interact with other android APIs.
| Parameters | |
|---|---|
cl |
ClassLoader: The default classloader to use for instantiation.This value must never be |
className |
String: The class to be instantiated.This value must never be |
intent |
Intent: Intent creating the class.
This value may be |
| Returns | |
|---|---|
Activity |
This value will never be |
| Throws | |
|---|---|
InstantiationException |
|
IllegalAccessException |
|
ClassNotFoundException |
|
instantiateApplication
public Application instantiateApplication (ClassLoader cl, String className)
Allows application to override the creation of the application object. This can be used to perform things such as dependency injection or class loader changes to these classes.
This method is only intended to provide a hook for instantiation. It does not provide earlier access to the Application object. The returned object will not be initialized as a Context yet and should not be used to interact with other android APIs.
| Parameters | |
|---|---|
cl |
ClassLoader: The default classloader to use for instantiation.This value must never be |
className |
String: The class to be instantiated.
This value must never be |
| Returns | |
|---|---|
Application |
This value will never be |
| Throws | |
|---|---|
InstantiationException |
|
IllegalAccessException |
|
ClassNotFoundException |
|
instantiateProvider
public ContentProvider instantiateProvider (ClassLoader cl, String className)
Allows application to override the creation of providers. This can be used to perform things such as dependency injection or class loader changes to these classes.
This method is only intended to provide a hook for instantiation. It does not provide earlier access to the ContentProvider object. The returned object will not be initialized with a Context yet and should not be used to interact with other android APIs.
| Parameters | |
|---|---|
cl |
ClassLoader: The default classloader to use for instantiation.This value must never be |
className |
String: The class to be instantiated.
This value must never be |
| Returns | |
|---|---|
ContentProvider |
This value will never be |
| Throws | |
|---|---|
InstantiationException |
|
IllegalAccessException |
|
ClassNotFoundException |
|
instantiateReceiver
public BroadcastReceiver instantiateReceiver (ClassLoader cl, String className, Intent intent)
Allows application to override the creation of receivers. This can be used to perform things such as dependency injection or class loader changes to these classes.
| Parameters | |
|---|---|
cl |
ClassLoader: The default classloader to use for instantiation.This value must never be |
className |
String: The class to be instantiated.This value must never be |
intent |
Intent: Intent creating the class.
This value may be |
| Returns | |
|---|---|
BroadcastReceiver |
This value will never be |
| Throws | |
|---|---|
InstantiationException |
|
IllegalAccessException |
|
ClassNotFoundException |
|
instantiateService
public Service instantiateService (ClassLoader cl, String className, Intent intent)
Allows application to override the creation of services. This can be used to perform things such as dependency injection or class loader changes to these classes.
This method is only intended to provide a hook for instantiation. It does not provide earlier access to the Service object. The returned object will not be initialized as a Context yet and should not be used to interact with other android APIs.
| Parameters | |
|---|---|
cl |
ClassLoader: The default classloader to use for instantiation.This value must never be |
className |
String: The class to be instantiated.This value must never be |
intent |
Intent: Intent creating the class.
This value may be |
| Returns | |
|---|---|
Service |
This value will never be |
| Throws | |
|---|---|
InstantiationException |
|
IllegalAccessException |
|
ClassNotFoundException |
|
Interfaces
- ActionBar.OnMenuVisibilityListener
- ActionBar.OnNavigationListener
- ActionBar.TabListener
- AlarmManager.OnAlarmListener
- Application.ActivityLifecycleCallbacks
- Application.OnProvideAssistDataListener
- AppOpsManager.OnOpChangedListener
- DatePickerDialog.OnDateSetListener
- FragmentBreadCrumbs.OnBreadCrumbClickListener
- FragmentManager.BackStackEntry
- FragmentManager.OnBackStackChangedListener
- KeyguardManager.OnKeyguardExitResult
- LoaderManager.LoaderCallbacks
- Notification.Action.Extender
- Notification.Extender
- PendingIntent.OnFinished
- SearchManager.OnCancelListener
- SearchManager.OnDismissListener
- SharedElementCallback.OnSharedElementsReadyListener
- TimePickerDialog.OnTimeSetListener
- UiAutomation.AccessibilityEventFilter
- UiAutomation.OnAccessibilityEventListener
- WallpaperManager.OnColorsChangedListener
Classes
- ActionBar
- ActionBar.LayoutParams
- ActionBar.Tab
- Activity
- ActivityGroup
- ActivityManager
- ActivityManager.AppTask
- ActivityManager.MemoryInfo
- ActivityManager.ProcessErrorStateInfo
- ActivityManager.RecentTaskInfo
- ActivityManager.RunningAppProcessInfo
- ActivityManager.RunningServiceInfo
- ActivityManager.RunningTaskInfo
- ActivityManager.TaskDescription
- ActivityOptions
- AlarmManager
- AlarmManager.AlarmClockInfo
- AlertDialog
- AlertDialog.Builder
- AliasActivity
- AppComponentFactory
- Application
- ApplicationErrorReport
- ApplicationErrorReport.AnrInfo
- ApplicationErrorReport.BatteryInfo
- ApplicationErrorReport.CrashInfo
- ApplicationErrorReport.RunningServiceInfo
- AppOpsManager
- AutomaticZenRule
- DatePickerDialog
- Dialog
- DialogFragment
- DownloadManager
- DownloadManager.Query
- DownloadManager.Request
- ExpandableListActivity
- Fragment
- Fragment.SavedState
- FragmentBreadCrumbs
- FragmentContainer
- FragmentController
- FragmentHostCallback
- FragmentManager
- FragmentManager.FragmentLifecycleCallbacks
- FragmentManagerNonConfig
- FragmentTransaction
- Instrumentation
- Instrumentation.ActivityMonitor
- Instrumentation.ActivityResult
- IntentService
- KeyguardManager
- KeyguardManager.KeyguardDismissCallback
- KeyguardManager.KeyguardLock
- LauncherActivity
- LauncherActivity.IconResizer
- LauncherActivity.ListItem
- ListActivity
- ListFragment
- LoaderManager
- LocalActivityManager
- MediaRouteActionProvider
- MediaRouteButton
- NativeActivity
- Notification
- Notification.Action
- Notification.Action.Builder
- Notification.Action.WearableExtender
- Notification.BigPictureStyle
- Notification.BigTextStyle
- Notification.Builder
- Notification.CarExtender
- Notification.CarExtender.Builder
- Notification.CarExtender.UnreadConversation
- Notification.DecoratedCustomViewStyle
- Notification.DecoratedMediaCustomViewStyle
- Notification.InboxStyle
- Notification.MediaStyle
- Notification.MessagingStyle
- Notification.MessagingStyle.Message
- Notification.Style
- Notification.WearableExtender
- NotificationChannel
- NotificationChannelGroup
- NotificationManager
- NotificationManager.Policy
- PendingIntent
- Person
- Person.Builder
- PictureInPictureParams
- PictureInPictureParams.Builder
- Presentation
- ProgressDialog
- RemoteAction
- RemoteInput
- RemoteInput.Builder
- SearchableInfo
- SearchManager
- Service
- SharedElementCallback
- TabActivity
- TaskStackBuilder
- TimePickerDialog
- UiAutomation
- UiModeManager
- VoiceInteractor
- VoiceInteractor.AbortVoiceRequest
- VoiceInteractor.CommandRequest
- VoiceInteractor.CompleteVoiceRequest
- VoiceInteractor.ConfirmationRequest
- VoiceInteractor.PickOptionRequest
- VoiceInteractor.PickOptionRequest.Option
- VoiceInteractor.Prompt
- VoiceInteractor.Request
- WallpaperColors
- WallpaperInfo
- WallpaperManager
Exceptions