Tabnine Logo
ZoneRulesProvider.registerProvider
Code IndexAdd Tabnine to your IDE (free)

How to use
registerProvider
method
in
org.threeten.bp.zone.ZoneRulesProvider

Best Java code snippets using org.threeten.bp.zone.ZoneRulesProvider.registerProvider (Showing top 4 results out of 315)

origin: JakeWharton/ThreeTenABP

 @Override protected void initializeProviders() {
  TzdbZoneRulesProvider provider;

  InputStream is = null;
  try {
   is = context.getAssets().open("org/threeten/bp/TZDB.dat");
   provider = new TzdbZoneRulesProvider(is);
  } catch (IOException e) {
   throw new IllegalStateException("TZDB.dat missing from assets.", e);
  } finally {
   if (is != null) {
    try {
     is.close();
    } catch (IOException ignored) {
    }
   }
  }

  ZoneRulesProvider.registerProvider(provider);
 }
}
origin: gabrielittner/lazythreetenbp

  @Override
  protected void initializeProviders() {
    ZoneRulesProvider.registerProvider(new LazyZoneRulesProvider(application));
  }
}
origin: ThreeTen/threetenbp

  @Override
  protected void initializeProviders() {
    ServiceLoader<ZoneRulesProvider> loader = ServiceLoader.load(ZoneRulesProvider.class, ZoneRulesProvider.class.getClassLoader());
    for (ZoneRulesProvider provider : loader) {
      try {
        ZoneRulesProvider.registerProvider(provider);
      } catch (ServiceConfigurationError ex) {
        if (!(ex.getCause() instanceof SecurityException)) {
          throw ex;
        }
      }
    }
  }
}
origin: org.threeten/threetenbp

  @Override
  protected void initializeProviders() {
    ServiceLoader<ZoneRulesProvider> loader = ServiceLoader.load(ZoneRulesProvider.class, ZoneRulesProvider.class.getClassLoader());
    for (ZoneRulesProvider provider : loader) {
      try {
        ZoneRulesProvider.registerProvider(provider);
      } catch (ServiceConfigurationError ex) {
        if (!(ex.getCause() instanceof SecurityException)) {
          throw ex;
        }
      }
    }
  }
}
org.threeten.bp.zoneZoneRulesProviderregisterProvider

Javadoc

Registers a zone rules provider.

This adds a new provider to those currently available. A provider supplies rules for one or more zone IDs. A provider cannot be registered if it supplies a zone ID that has already been registered. See the notes on time-zone IDs in ZoneId, especially the section on using the concept of a "group" to make IDs unique.

To ensure the integrity of time-zones already created, there is no way to deregister providers.

Popular methods of ZoneRulesProvider

  • getAvailableZoneIds
    Gets the set of available zone IDs. These zone IDs are loaded and available for use by ZoneId.
  • getRules
    Gets the rules for the zone ID. This returns the latest available rules for the zone ID. This meth
  • getProvider
    Gets the provider for the zone ID.
  • provideRefresh
    SPI method to refresh the rules from the underlying data provider. This method provides the opportun
  • provideRules
    SPI method to get the rules for the zone ID. This loads the rules for the region and version specifi
  • provideVersions
    SPI method to get the history of rules for the zone ID. This returns a map of historical rules keyed
  • provideZoneIds
    SPI method to get the available zone IDs. This obtains the IDs that this ZoneRulesProvider provides.
  • registerProvider0
    Registers the provider.

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now