I need to get the value of a field using reflection. It so happens that I am not always sure what the datatype of the field is. For that, and to avoid some code duplication
In case of a List of type Long, Adding L to end of each Integer value
List list = new ArrayList(); list = Arrays.asList(1L, 2L, 3L, 4L);