- java.lang.Object
-
- com.ibm.j9ddr.vm29.j9.J9ConstantHelper
-
public final class J9ConstantHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description J9ConstantHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
getBoolean(Class<?> clazz, String name, boolean defaultValue)
Using reflection, read the value of a public static final boolean field from the given class or, if the field is not present, return the default value provided.static int
getInt(Class<?> clazz, String name, int defaultValue)
Using reflection, read the value of a public static final int field from the given class or, if the field is not present, return the default value provided.static long
getLong(Class<?> clazz, String name, long defaultValue)
Using reflection, read the value of a public static final long field from the given class or, if the field is not present, return the default value provided.
-
-
-
Method Detail
-
getLong
public static long getLong(Class<?> clazz, String name, long defaultValue)
Using reflection, read the value of a public static final long field from the given class or, if the field is not present, return the default value provided.- Parameters:
clazz
- the class which owns the field of interestname
- the name of the fielddefaultValue
- the value to be returned if the field is not present- Returns:
- the value of the field, or the default value
-
getBoolean
public static boolean getBoolean(Class<?> clazz, String name, boolean defaultValue)
Using reflection, read the value of a public static final boolean field from the given class or, if the field is not present, return the default value provided.- Parameters:
clazz
- the class which owns the field of interestname
- the name of the fielddefaultValue
- the value to be returned if the field is not present- Returns:
- the value of the boolean field, or the default value
-
getInt
public static int getInt(Class<?> clazz, String name, int defaultValue)
Using reflection, read the value of a public static final int field from the given class or, if the field is not present, return the default value provided.- Parameters:
clazz
- the class which owns the field of interestname
- the name of the fielddefaultValue
- the value to be returned if the field is not present- Returns:
- the value of the field, or the default value
-
-