Interface MetadataBootstrappingGuard<T extends com.google.i18n.phonenumbers.metadata.source.MetadataContainer>
- Type Parameters:
T
- needs to extendMetadataContainer
public interface MetadataBootstrappingGuard<T extends com.google.i18n.phonenumbers.metadata.source.MetadataContainer>
Guard that ensures that metadata bootstrapping process (loading and parsing) is triggered only
once per metadata file.
-
Method Summary
Modifier and TypeMethodDescriptiongetOrBootstrap
(String phoneMetadataFile) If metadata from the provided file has not yet been read, invokes loading and parsing from the provided file and adds the result to guardedMetadataContainer
.
-
Method Details
-
getOrBootstrap
If metadata from the provided file has not yet been read, invokes loading and parsing from the provided file and adds the result to guardedMetadataContainer
.- Parameters:
phoneMetadataFile
- to read from- Returns:
- guarded
MetadataContainer
-