@@ -24,65 +24,65 @@ import dagger.hilt.EntryPoints
24
24
import dagger.hilt.android.internal.Contexts
25
25
26
26
/* * Utility functions for dealing with entry points for standard Android components. */
27
- object EntryPointAccessors {
27
+ public object EntryPointAccessors {
28
28
/* *
29
29
* Returns the entry point interface from an application. The context can be any context derived
30
30
* from the application context. May only be used with entry point interfaces installed in the
31
31
* SingletonComponent.
32
32
*/
33
33
@JvmStatic
34
- fun <T > fromApplication (context : Context , entryPoint : Class <T >): T =
34
+ public fun <T > fromApplication (context : Context , entryPoint : Class <T >): T =
35
35
EntryPoints .get(Contexts .getApplication(context.applicationContext), entryPoint)
36
36
37
37
/* *
38
38
* Returns the entry point interface from an application. The context can be any context derived
39
39
* from the application context. May only be used with entry point interfaces installed in the
40
40
* SingletonComponent.
41
41
*/
42
- inline fun <reified T > fromApplication (context : Context ): T =
42
+ public inline fun <reified T > fromApplication (context : Context ): T =
43
43
fromApplication(context, T ::class .java)
44
44
45
45
/* *
46
46
* Returns the entry point interface from an activity. May only be used with entry point
47
47
* interfaces installed in the ActivityComponent.
48
48
*/
49
49
@JvmStatic
50
- fun <T > fromActivity (activity : Activity , entryPoint : Class <T >): T =
50
+ public fun <T > fromActivity (activity : Activity , entryPoint : Class <T >): T =
51
51
EntryPoints .get(activity, entryPoint)
52
52
53
53
/* *
54
54
* Returns the entry point interface from an activity. May only be used with entry point
55
55
* interfaces installed in the ActivityComponent.
56
56
*/
57
- inline fun <reified T > fromActivity (activity : Activity ): T =
57
+ public inline fun <reified T > fromActivity (activity : Activity ): T =
58
58
fromActivity(activity, T ::class .java)
59
59
60
60
/* *
61
61
* Returns the entry point interface from a fragment. May only be used with entry point interfaces
62
62
* installed in the FragmentComponent.
63
63
*/
64
64
@JvmStatic
65
- fun <T > fromFragment (fragment : Fragment , entryPoint : Class <T >): T =
65
+ public fun <T > fromFragment (fragment : Fragment , entryPoint : Class <T >): T =
66
66
EntryPoints .get(fragment, entryPoint)
67
67
68
68
/* *
69
69
* Returns the entry point interface from a fragment. May only be used with entry point interfaces
70
70
* installed in the FragmentComponent.
71
71
*/
72
- inline fun <reified T > fromFragment (fragment : Fragment ): T =
72
+ public inline fun <reified T > fromFragment (fragment : Fragment ): T =
73
73
fromFragment(fragment, T ::class .java)
74
74
75
75
/* *
76
76
* Returns the entry point interface from a view. May only be used with entry point interfaces
77
77
* installed in the ViewComponent or ViewNoFragmentComponent.
78
78
*/
79
79
@JvmStatic
80
- fun <T > fromView (view : View , entryPoint : Class <T >): T = EntryPoints .get(view, entryPoint)
80
+ public fun <T > fromView (view : View , entryPoint : Class <T >): T = EntryPoints .get(view, entryPoint)
81
81
82
82
/* *
83
83
* Returns the entry point interface from a view. May only be used with entry point interfaces
84
84
* installed in the ViewComponent or ViewNoFragmentComponent.
85
85
*/
86
- inline fun <reified T > fromView (view : View ): T =
86
+ public inline fun <reified T > fromView (view : View ): T =
87
87
fromView(view, T ::class .java)
88
88
}
0 commit comments