Class Util


  • public class Util
    extends Object
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • isOSWindows

        public static boolean isOSWindows()
      • buildSetPropertyName

        public static String buildSetPropertyName​(String pProperty)
      • buildGetPropertyName

        public static String buildGetPropertyName​(String pProperty,
                                                  boolean pIsBoolean)
      • getMethodWithAnnotation

        public static <T extends AnnotationMethod getMethodWithAnnotation​(Class pClass,
                                                                            Class<T> pAnnotation)
      • getMethodFirstArgumentClass

        public static Class getMethodFirstArgumentClass​(Method pMethod)
      • createInstance

        public static Object createInstance​(String pClass)
      • createInstance

        public static Object createInstance​(Class<?> pClass)
      • getMetricRegistry

        public static com.codahale.metrics.MetricRegistry getMetricRegistry()
      • getEnvironmentValue

        public static String getEnvironmentValue​(String pName,
                                                 String pDefault)
        Get property value from Java System Properties, if not found then get it form environment variable.
        Parameters:
        pName - Name of system property
        pDefault - Default value
        Returns:
        Return environment value
      • getEnvironmentValue

        public static String getEnvironmentValue​(String pName)
      • getSystemLayers

        public static List<String> getSystemLayers()
      • convertDotToCamelCase

        public static String convertDotToCamelCase​(String pValue)
      • convertCSVIntoArray

        public static String[] convertCSVIntoArray​(String pValue)