Package in.erail.glue.common
Class Util
- java.lang.Object
-
- in.erail.glue.common.Util
-
public class Util extends Object
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuildGetPropertyName(String pProperty, boolean pIsBoolean)static StringbuildSetPropertyName(String pProperty)static String[]convertCSVIntoArray(String pValue)static StringconvertDotToCamelCase(String pValue)static ObjectcreateInstance(Class<?> pClass)static ObjectcreateInstance(String pClass)static ConfigSerializationFactorygetConfigSerializationFactory()static StringgetEnvironmentValue(String pName)static StringgetEnvironmentValue(String pName, String pDefault)Get property value from Java System Properties, if not found then get it form environment variable.static StringgetLastValue(com.google.common.collect.ListMultimap<String,ValueWithModifier> pMap, String pPropertyName)static StringgetLastValue(com.google.common.collect.ListMultimap<String,ValueWithModifier> pMap, String pPropertyName, String pDefault)static ValueWithModifiergetLastValueWithModifier(Collection<ValueWithModifier> pList)static Map<String,String>getMapFromValue(String pValue)static MethodgetMethod(Class pClass, String pMethodName)static ClassgetMethodFirstArgumentClass(Method pMethod)static <T extends Annotation>
MethodgetMethodWithAnnotation(Class pClass, Class<T> pAnnotation)static com.codahale.metrics.MetricRegistrygetMetricRegistry()static List<String>getSystemLayers()static booleanisOSWindows()static Stringunzip(Path pZipFilePath, Path pDestinationPath)
-
-
-
Method Detail
-
isOSWindows
public static boolean isOSWindows()
-
buildGetPropertyName
public static String buildGetPropertyName(String pProperty, boolean pIsBoolean)
-
getMethodWithAnnotation
public static <T extends Annotation> Method getMethodWithAnnotation(Class pClass, Class<T> pAnnotation)
-
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 propertypDefault- Default value- Returns:
- Return environment value
-
getConfigSerializationFactory
public static ConfigSerializationFactory getConfigSerializationFactory()
-
getLastValueWithModifier
public static ValueWithModifier getLastValueWithModifier(Collection<ValueWithModifier> pList)
-
getLastValue
public static String getLastValue(com.google.common.collect.ListMultimap<String,ValueWithModifier> pMap, String pPropertyName)
-
getLastValue
public static String getLastValue(com.google.common.collect.ListMultimap<String,ValueWithModifier> pMap, String pPropertyName, String pDefault)
-
unzip
public static String unzip(Path pZipFilePath, Path pDestinationPath) throws IOException
- Throws:
IOException
-
-