Interface MetadataBootstrappingGuard<T extends com.google.i18n.phonenumbers.metadata.source.MetadataContainer>

Type Parameters:
T - needs to extend MetadataContainer

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 Type
    Method
    Description
    getOrBootstrap(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 guarded MetadataContainer.
  • Method Details

    • getOrBootstrap

      T getOrBootstrap(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 guarded MetadataContainer.
      Parameters:
      phoneMetadataFile - to read from
      Returns:
      guarded MetadataContainer