Let's assume we have the class Jedi
, which contains two static inner classes: Master
and Padawan
.
public class Jedi { public static class Master {} public static class Padawan {} }
The following example shows how to get a reference to the inner class Master
:
Class<?> masterClass = {@link org.fest.reflect.core.Reflection#staticInnerClass(String) staticInnerClass}("Master"). {@link org.fest.reflect.innerclass.StaticInnerClassName#in(Class) in}(Jedi.class). {@link org.fest.reflect.innerclass.Invoker#get() get}();@author Alex Ruiz @since 1.1
|
|