Java Class getAnnotatedSuperclass() Method

The getAnnotatedSuperclass() method of java Class class returns an AnnotatedType object that shows the use of a type to specify the superclass of the entity represented by this(calling class object) Class object.

Syntax

Parameter

No parameter is passed.

Returns

An object representing the superclass

Throws

Does not throw an exception.

Example 1

Test it Now

Output:

Type Name : java.lang.Thread
Annotations  : []
Declared  Annotations: []
AnnotatedType class: sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl
AnnotatedType class implementing interfaces: [interface java.lang.reflect.AnnotatedType]

Next TopicJava Class




Latest Courses