Class NestedClassSelector

    • Constructor Summary

      Constructors 
      Constructor Description
      NestedClassSelector​(java.lang.ClassLoader classLoader, java.util.List<java.lang.String> enclosingClassNames, java.lang.String nestedClassName)  
      NestedClassSelector​(java.util.List<java.lang.Class<?>> enclosingClasses, java.lang.Class<?> nestedClass)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.ClassLoader getClassLoader()
      Get the ClassLoader used to load the selected nested class.
      java.util.List<java.lang.Class<?>> getEnclosingClasses()
      Get the list of Class enclosing the selected nested Class.
      java.util.List<java.lang.String> getEnclosingClassNames()
      Get the names of the classes enclosing the selected nested class.
      java.lang.Class<?> getNestedClass()
      Get the selected nested Class.
      java.lang.String getNestedClassName()
      Get the name of the selected nested class.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • classLoader

        private final java.lang.ClassLoader classLoader
      • enclosingClassSelectors

        private final java.util.List<ClassSelector> enclosingClassSelectors
      • nestedClassSelector

        private final ClassSelector nestedClassSelector
    • Constructor Detail

      • NestedClassSelector

        NestedClassSelector​(java.lang.ClassLoader classLoader,
                            java.util.List<java.lang.String> enclosingClassNames,
                            java.lang.String nestedClassName)
      • NestedClassSelector

        NestedClassSelector​(java.util.List<java.lang.Class<?>> enclosingClasses,
                            java.lang.Class<?> nestedClass)
    • Method Detail

      • getClassLoader

        @API(status=EXPERIMENTAL,
             since="1.10")
        public java.lang.ClassLoader getClassLoader()
        Get the ClassLoader used to load the selected nested class.
        Returns:
        the ClassLoader; potentially null
        Since:
        1.10
      • getEnclosingClassNames

        public java.util.List<java.lang.String> getEnclosingClassNames()
        Get the names of the classes enclosing the selected nested class.
      • getEnclosingClasses

        public java.util.List<java.lang.Class<?>> getEnclosingClasses()
        Get the list of Class enclosing the selected nested Class.

        If the Class were not provided, but only the name of the nested class and its enclosing classes, this method attempts to lazily load the list of enclosing Class and throws a PreconditionViolationException if the classes cannot be loaded.

      • getNestedClassName

        public java.lang.String getNestedClassName()
        Get the name of the selected nested class.
      • getNestedClass

        public java.lang.Class<?> getNestedClass()
        Get the selected nested Class.

        If the Class were not provided, but only the name of the nested class and its enclosing classes, this method attempts to lazily load the nested Class and throws a PreconditionViolationException if the class cannot be loaded.

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object