1- package io .github .eisop .runtimeframework .policy ;
1+ package io .github .eisop .runtimeframework .strategy ;
22
33import io .github .eisop .runtimeframework .core .CheckGenerator ;
44import io .github .eisop .runtimeframework .core .TypeSystemConfiguration ;
@@ -248,7 +248,15 @@ public CheckGenerator getBridgeReturnCheck(ParentMethod parentMethod) {
248248 return null ;
249249 }
250250
251- private List <Annotation > getMethodParamAnnotations (MethodModel method , int paramIndex ) {
251+ protected List <Annotation > getMethodAnnotations (MethodModel method ) {
252+ List <Annotation > result = new ArrayList <>();
253+ method
254+ .findAttribute (Attributes .runtimeVisibleAnnotations ())
255+ .ifPresent (attr -> result .addAll (attr .annotations ()));
256+ return result ;
257+ }
258+
259+ protected List <Annotation > getMethodParamAnnotations (MethodModel method , int paramIndex ) {
252260 List <Annotation > result = new ArrayList <>();
253261 method
254262 .findAttribute (Attributes .runtimeVisibleParameterAnnotations ())
@@ -269,7 +277,7 @@ private List<Annotation> getMethodParamAnnotations(MethodModel method, int param
269277 return result ;
270278 }
271279
272- private List <Annotation > getMethodReturnAnnotations (MethodModel method ) {
280+ protected List <Annotation > getMethodReturnAnnotations (MethodModel method ) {
273281 List <Annotation > result = new ArrayList <>();
274282 method
275283 .findAttribute (Attributes .runtimeVisibleAnnotations ())
@@ -287,7 +295,7 @@ private List<Annotation> getMethodReturnAnnotations(MethodModel method) {
287295 return result ;
288296 }
289297
290- private List <Annotation > getFieldAnnotations (FieldModel field ) {
298+ protected List <Annotation > getFieldAnnotations (FieldModel field ) {
291299 List <Annotation > result = new ArrayList <>();
292300 field
293301 .findAttribute (Attributes .runtimeVisibleAnnotations ())
@@ -305,7 +313,7 @@ private List<Annotation> getFieldAnnotations(FieldModel field) {
305313 return result ;
306314 }
307315
308- private List <Annotation > getLocalVariableAnnotations (MethodModel method , int slot ) {
316+ protected List <Annotation > getLocalVariableAnnotations (MethodModel method , int slot ) {
309317 List <Annotation > result = new ArrayList <>();
310318 method
311319 .code ()
0 commit comments