Class JavaPropertiesSource

java.lang.Object
io.fluxcapacitor.common.application.JavaPropertiesSource
All Implemented Interfaces:
PropertySource
Direct Known Subclasses:
ApplicationEnvironmentPropertiesSource, ApplicationPropertiesSource, SystemPropertiesSource

public abstract class JavaPropertiesSource extends Object implements PropertySource
Base class for PropertySource implementations backed by a Properties object.

This class provides a thin wrapper over a Properties instance and offers a consistent way to retrieve configuration values using the get(String) method.

It can be extended by concrete sources such as SystemPropertiesSource or custom property file loaders.

See Also:
  • Constructor Details

    • JavaPropertiesSource

      public JavaPropertiesSource(Properties properties)
      Creates a new property source backed by the given Properties instance.
      Parameters:
      properties - the Properties instance to use for lookups
  • Method Details

    • get

      public String get(String name)
      Retrieves the value for the given property name.
      Specified by:
      get in interface PropertySource
      Parameters:
      name - the property key
      Returns:
      the property value, or null if not present