ppt4j 1.0
 
Loading...
Searching...
No Matches
ppt4j.util.PropertyUtils Class Reference

Static Public Member Functions

static void load (InputStream is)
 
static void override (Properties props)
 
static void init ()
 
static void initValue (Class<?> clazz)
 
static String getProperty (String key)
 

Member Function Documentation

◆ getProperty()

static String ppt4j.util.PropertyUtils.getProperty ( String key)
static

Retrieves the value of a property based on the provided key. If the key is null or empty, an exception is thrown. If the property is not found in the properties map, it falls back to retrieving it from the system properties. If the property is still not found, an exception is thrown.

Parameters
keythe key of the property to retrieve
Returns
the value of the property as a String
Exceptions
IllegalStateExceptionif the key is null or empty, or if the property is not found

◆ init()

static void ppt4j.util.PropertyUtils.init ( )
static

Initializes the properties of all classes in the "ppt4j" package using reflection. For each class in the package, calls the initValue method from the PropertyUtils class to initialize the properties.

◆ initValue()

static void ppt4j.util.PropertyUtils.initValue ( Class<?> clazz)
static

Initializes the values of fields in a given class using properties defined in the Property annotation.

Parameters
clazzthe class containing the fields to be initialized

◆ load()

static void ppt4j.util.PropertyUtils.load ( InputStream is)
static

Loads a properties file from the given input stream.

Parameters
isthe input stream from which to load the properties file

◆ override()

static void ppt4j.util.PropertyUtils.override ( Properties props)
static

Overrides the current properties with the new properties provided. Copies all of the mappings from the specified properties to this properties object.

Parameters
propsthe properties to be added/overridden

The documentation for this class was generated from the following file: