Class PropertyUtils


  • public final class PropertyUtils
    extends java.lang.Object
    System properties utils. Used to read classes, configured in system properties.
    Since:
    18.08.2019
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.List<T> getProperty​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.String> aliases)
      Read system property value and instantiate configured classes.
      static void setProperty​(java.lang.String name, java.lang.Class<?>... types)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getProperty

        public static <T> java.util.List<T> getProperty​(java.lang.String name,
                                                        java.util.Map<java.lang.String,​java.lang.String> aliases)
        Read system property value and instantiate configured classes. Classes are instantiated using default constructor.
        Type Parameters:
        T - resulted instance type
        Parameters:
        name - system property name
        aliases - registered aliases
        Returns:
        list of resolved instance or empty list if nothing configured
      • setProperty

        public static void setProperty​(java.lang.String name,
                                       java.lang.Class<?>... types)
        Parameters:
        name - system property name
        types - classes to write to property