Java Class getAnnotatedSuperclass() 方法

2025年3月21日 | 阅读 1 分钟

Java Class 类的 getAnnotatedSuperclass() 方法返回一个 AnnotatedType 对象,该对象显示了用于指定此(调用类对象)Class 对象所代表实体的超类的类型使用情况。

语法

参数

不传递任何参数。

返回值

一个表示超类的对象

抛出

不抛出异常。

示例 1

输出

Type Name : java.lang.Thread
Annotations  : []
Declared  Annotations: []
AnnotatedType class: sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl
AnnotatedType class implementing interfaces: [interface java.lang.reflect.AnnotatedType]
 
下一个主题Java类