Package org.fest.reflect.innerclass
Class StaticInnerClassName
java.lang.Object
org.fest.reflect.innerclass.StaticInnerClassName
Understands the name of a static inner class.
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();
- Since:
- 1.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifies the declaring class of the static inner class to obtain.static StaticInnerClassNameCreates a newStaticInnerClassName.private static void
-
Field Details
-
name
-
-
Constructor Details
-
StaticInnerClassName
-
-
Method Details
-
startStaticInnerClassAccess
Creates a newStaticInnerClassName.- Parameters:
name- the name of the static inner class to obtain.- Returns:
- the created
StaticInnerClassName. - Throws:
NullPointerException- if the given name isnull.IllegalArgumentException- if the given name is empty.
-
validateIsNotNullOrEmpty
-
in
Specifies the declaring class of the static inner class to obtain.- Parameters:
declaringClass- the declaring class.- Returns:
- an object responsible for obtaining a reference to a static inner class.
- Throws:
NullPointerException- if the given declaring class isnull.
-