public final native void notifyAll()
declared constructors:
public ClassExtractorTest()
constructors:
public ClassExtractorTest()
declared inner classes:
class ClassExtractorTest$Direction
class ClassExtractorTest$InnerClass
class ClassExtractorTest$StaticInnerClass
inner classes:
class ClassExtractorTest$Direction
class ClassExtractorTest$InnerClass
class ClassExtractorTest$StaticInnerClass
super classes:
class ClassExtractor
interfaces:
interface Runnable
interface Serializable
interface Cloneable
}
其实,没有任何技术含量,主要就是用到java.lang.Class里面的一些接口,但这里面最难理解的就是带有Delcared的方法和其他方法的区别,比如getDeclaredMethods()与getMethods()的区别,通过查文档和实际测试可以发现:
带有Declared的方法是返回该类所声明的方法或域,也就是你写这个类时所声明的东西,它包括任何类里面声明的私有的,共有的等等。但是不包括类所继承或实现的方法或域
而其他的方法是返回该类所公开出来的所有接口,包括其声明的公开接口,以及继承来的,所实现的接口
摘自 浪人的星空