Class StaticInnerClassName


  • public final class StaticInnerClassName
    extends java.lang.Object
    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
    Author:
    Alex Ruiz
    • Method Detail

      • startStaticInnerClassAccess

        public static StaticInnerClassName startStaticInnerClassAccess​(java.lang.String name)
        Creates a new StaticInnerClassName.
        Parameters:
        name - the name of the static inner class to obtain.
        Returns:
        the created StaticInnerClassName.
        Throws:
        java.lang.NullPointerException - if the given name is null.
        java.lang.IllegalArgumentException - if the given name is empty.
      • in

        public Invoker in​(java.lang.Class<?> declaringClass)
        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:
        java.lang.NullPointerException - if the given declaring class is null.