@@ -293,7 +293,7 @@ private static void generateCommandDispatcherGetCommandConfigsMethod(ClassCreato
293293 .newInstance (MethodDescriptor .ofConstructor (HashMap .class ));
294294
295295 for (ClassInfo command : allCommands ) {
296- AnnotationInstance commandOptionsAnnotation = command .classAnnotation (COMMAND_OPTIONS );
296+ AnnotationInstance commandOptionsAnnotation = command .declaredAnnotation (COMMAND_OPTIONS );
297297
298298 if (commandOptionsAnnotation != null ) {
299299 getCommandConfigsMethodCreator .invokeVirtualMethod (
@@ -317,7 +317,7 @@ private static void generateCommandDispatcherGetCommandPermissionConfigsMethod(C
317317 .newInstance (MethodDescriptor .ofConstructor (HashMap .class ));
318318
319319 for (ClassInfo command : allCommands ) {
320- AnnotationInstance permissionAnnotation = command .classAnnotation (PERMISSION );
320+ AnnotationInstance permissionAnnotation = command .declaredAnnotation (PERMISSION );
321321
322322 if (permissionAnnotation != null ) {
323323 getCommandPermissionConfigsMethodCreator .invokeVirtualMethod (
@@ -355,7 +355,7 @@ private static void generateCommandDispatcherGetCommandTeamConfigsMethod(ClassCr
355355 .newInstance (MethodDescriptor .ofConstructor (HashMap .class ));
356356
357357 for (ClassInfo command : allCommands ) {
358- AnnotationInstance teamAnnotation = command .classAnnotation (TEAM );
358+ AnnotationInstance teamAnnotation = command .declaredAnnotation (TEAM );
359359
360360 if (teamAnnotation != null ) {
361361 getCommandTeamConfigsMethodCreator .invokeVirtualMethod (
@@ -394,15 +394,15 @@ private static void generateCommandDispatcherConstructor(ClassCreator commandDis
394394
395395 ResultHandle aliasesRh = toResultHandle (constructorMethodCreator , aliases );
396396 ResultHandle cliConfigRh ;
397- AnnotationInstance cliOptionsAnnotation = cliClassInfo .classAnnotation (CLI_OPTIONS );
397+ AnnotationInstance cliOptionsAnnotation = cliClassInfo .declaredAnnotation (CLI_OPTIONS );
398398
399399 ResultHandle defaultCommandConfigRh = getCommandConfig (constructorMethodCreator , index ,
400400 cliOptionsAnnotation != null ? cliOptionsAnnotation .valueWithDefault (index , "defaultCommandOptions" ).asNested ()
401401 : null );
402402 ResultHandle defaultCommandPermissionConfigRh = getCommandPermissionConfig (constructorMethodCreator ,
403- cliClassInfo .classAnnotation (PERMISSION ));
403+ cliClassInfo .declaredAnnotation (PERMISSION ));
404404 ResultHandle defaultCommandTeamConfigRh = getCommandTeamConfig (constructorMethodCreator ,
405- cliClassInfo .classAnnotation (TEAM ));
405+ cliClassInfo .declaredAnnotation (TEAM ));
406406
407407 if (cliOptionsAnnotation != null ) {
408408 cliConfigRh = constructorMethodCreator .newInstance (
@@ -460,12 +460,12 @@ private static List<String> getAliases(AnnotationInstance cliAnnotationInstance)
460460 List <String > cliAliases = new ArrayList <>();
461461 cliAliases .add (cliAnnotationInstance .value ("name" ).asString ());
462462
463- AnnotationInstance aliasAnnotation = cliAnnotationInstance .target ().asClass ().classAnnotation (ALIAS );
463+ AnnotationInstance aliasAnnotation = cliAnnotationInstance .target ().asClass ().declaredAnnotation (ALIAS );
464464 if (aliasAnnotation != null ) {
465465 cliAliases .add (aliasAnnotation .value ("name" ).asString ());
466466 }
467467
468- AnnotationInstance cliOptionsAnnotation = cliAnnotationInstance .target ().asClass ().classAnnotation (CLI_OPTIONS );
468+ AnnotationInstance cliOptionsAnnotation = cliAnnotationInstance .target ().asClass ().declaredAnnotation (CLI_OPTIONS );
469469 if (cliOptionsAnnotation != null ) {
470470 AnnotationValue aliases = cliOptionsAnnotation .value ("aliases" );
471471 if (aliases != null ) {
0 commit comments