public final class StaticInnerClassName extends Object
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 =staticInnerClass
("Master").in
(Jedi.class).get
();
Modifier and Type | Method and Description |
---|---|
Invoker |
in(Class<?> declaringClass)
Specifies the declaring class of the static inner class to obtain.
|
static StaticInnerClassName |
startStaticInnerClassAccess(String name)
Creates a new
StaticInnerClassName . |
public static StaticInnerClassName startStaticInnerClassAccess(String name)
StaticInnerClassName
.name
- the name of the static inner class to obtain.StaticInnerClassName
.NullPointerException
- if the given name is null
.IllegalArgumentException
- if the given name is empty.public Invoker in(Class<?> declaringClass)
declaringClass
- the declaring class.NullPointerException
- if the given declaring class is null
.Copyright © 2007–2016. All rights reserved.