Skip to content

Commit a5072ec

Browse files
committed
Add javadoc.
1 parent f9e0916 commit a5072ec

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

firebase-common/src/main/java/com/google/firebase/components/RestrictedComponentContainer.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ final class RestrictedComponentContainer extends AbstractComponentContainer {
6464
delegateContainer = container;
6565
}
6666

67+
/**
68+
* Returns an instance of the requested class if it is allowed.
69+
*
70+
* @throws IllegalArgumentException otherwise.
71+
*/
6772
@Override
6873
public <T> T get(Class<T> anInterface) {
6974
if (!allowedDirectInterfaces.contains(anInterface)) {
@@ -85,6 +90,11 @@ public <T> T get(Class<T> anInterface) {
8590
return publisher;
8691
}
8792

93+
/**
94+
* Returns an instance of the provider for the requested class if it is allowed.
95+
*
96+
* @throws IllegalArgumentException otherwise.
97+
*/
8898
@Override
8999
public <T> Provider<T> getProvider(Class<T> anInterface) {
90100
if (!allowedProviderInterfaces.contains(anInterface)) {
@@ -95,6 +105,11 @@ public <T> Provider<T> getProvider(Class<T> anInterface) {
95105
return delegateContainer.getProvider(anInterface);
96106
}
97107

108+
/**
109+
* Returns an instance of the provider for the set of requested classes if it is allowed.
110+
*
111+
* @throws IllegalArgumentException otherwise.
112+
*/
98113
@Override
99114
public <T> Provider<Set<T>> setOfProvider(Class<T> anInterface) {
100115
if (!allowedSetProviderInterfaces.contains(anInterface)) {
@@ -105,6 +120,11 @@ public <T> Provider<Set<T>> setOfProvider(Class<T> anInterface) {
105120
return delegateContainer.setOfProvider(anInterface);
106121
}
107122

123+
/**
124+
* Returns a set of requested classes if it is allowed.
125+
*
126+
* @throws IllegalArgumentException otherwise.
127+
*/
108128
@Override
109129
public <T> Set<T> setOf(Class<T> anInterface) {
110130
if (!allowedSetDirectInterfaces.contains(anInterface)) {

0 commit comments

Comments
 (0)