Interface ConfigurationPropertyLoader

    • Method Detail

      • load

        @Nullable
        java.util.List<ConfigurationProperty> load()
                                            throws java.lang.Throwable
        Loads a list of ConfigurationProperty instances.

        Example Usage

        
         ConfigurationPropertyLoader loader = ...; // Obtain an instance of a concrete implementation
         List<ConfigurationProperty> properties = loader.load();
         for (ConfigurationProperty property : properties) {
             System.out.println("Property Name: " + property.getName());
             System.out.println("Property Type: " + property.getType());
             System.out.println("Property Value: " + property.getValue());
         }
         
        Returns:
        a list of loaded ConfigurationProperty instances, or an empty list or null if no properties are loaded
        Throws:
        java.lang.Throwable - if any error occurs during generation
        See Also:
        ConfigurationProperty
      • loadAll

        @Nonnull
        @Immutable
        static java.util.List<ConfigurationProperty> loadAll()
        Loads all ConfigurationProperty instances by loading and executing all available ConfigurationPropertyLoader services via Java SPI mechanism.

        Example Usage

        
         List<ConfigurationProperty> properties = ConfigurationPropertyLoader.generateAll();
         for (ConfigurationProperty property : properties) {
             System.out.println("Property Name: " + property.getName());
             System.out.println("Property Type: " + property.getType());
             System.out.println("Property Value: " + property.getValue());
         }
         
        Returns:
        a list of loaded ConfigurationProperty instances, or an empty list if no loaders are found
        Throws:
        java.lang.Throwable - if any error occurs during generation
        See Also:
        load(), ServiceLoaderUtils.loadServicesList(Class)