September 2019
Intermediate to advanced
816 pages
18h 47m
English
In the case of fields (for example, slices), generics can be fetched via Field.getGenericType(), as follows:
Field slicesField = clazz.getDeclaredField("slices");Type slicesType = slicesField.getGenericType();
Calling printGenerics(slicesType) will output the following:
Class of type argument: class modern.challenge.SliceSimple name of type argument: Slice
Read now
Unlock full access