@@ -64,6 +64,11 @@ final class RestrictedComponentContainer extends AbstractComponentContainer {
64
64
delegateContainer = container ;
65
65
}
66
66
67
+ /**
68
+ * Returns an instance of the requested class if it is allowed.
69
+ *
70
+ * @throws IllegalArgumentException otherwise.
71
+ */
67
72
@ Override
68
73
public <T > T get (Class <T > anInterface ) {
69
74
if (!allowedDirectInterfaces .contains (anInterface )) {
@@ -85,6 +90,11 @@ public <T> T get(Class<T> anInterface) {
85
90
return publisher ;
86
91
}
87
92
93
+ /**
94
+ * Returns an instance of the provider for the requested class if it is allowed.
95
+ *
96
+ * @throws IllegalArgumentException otherwise.
97
+ */
88
98
@ Override
89
99
public <T > Provider <T > getProvider (Class <T > anInterface ) {
90
100
if (!allowedProviderInterfaces .contains (anInterface )) {
@@ -95,6 +105,11 @@ public <T> Provider<T> getProvider(Class<T> anInterface) {
95
105
return delegateContainer .getProvider (anInterface );
96
106
}
97
107
108
+ /**
109
+ * Returns an instance of the provider for the set of requested classes if it is allowed.
110
+ *
111
+ * @throws IllegalArgumentException otherwise.
112
+ */
98
113
@ Override
99
114
public <T > Provider <Set <T >> setOfProvider (Class <T > anInterface ) {
100
115
if (!allowedSetProviderInterfaces .contains (anInterface )) {
@@ -105,6 +120,11 @@ public <T> Provider<Set<T>> setOfProvider(Class<T> anInterface) {
105
120
return delegateContainer .setOfProvider (anInterface );
106
121
}
107
122
123
+ /**
124
+ * Returns a set of requested classes if it is allowed.
125
+ *
126
+ * @throws IllegalArgumentException otherwise.
127
+ */
108
128
@ Override
109
129
public <T > Set <T > setOf (Class <T > anInterface ) {
110
130
if (!allowedSetDirectInterfaces .contains (anInterface )) {
0 commit comments