public static List<MethodAnnotationPair> getAnnotatedMethodsOfInstance(final Object instance) {

        List<MethodAnnotationPair> result = new ArrayList<MethodAnnotationPair>();


        for (Method method : instance.getClass().getDeclaredMethods()) {

            if (checkIsPublic(method) && checkMethodHasNoParameters(method) && checkMethodHasNonVoidReturnType(method)) {

                TraceeContextProviderMethod annotation = method.getAnnotation(TraceeContextProviderMethod.class);

                // check if method has no parameters and is annotated
                if (annotation != null) {
                    result.add(new MethodAnnotationPair(instance.getClass(), method, annotation));
                }

            }

        }

        return result;

    }
public static List<MethodAnnotationPair> getAnnotatedMethodsOfInstance(final Object instance) {

        List<MethodAnnotationPair> result = new ArrayList<MethodAnnotationPair>();


        for (Method method : instance.getClass().getDeclaredMethods()) {

            if (checkIsPublic(method) && checkMethodHasNoParameters(method) && checkMethodHasNonVoidReturnType(method)) {

                TraceeContextProviderMethod annotation = method.getAnnotation(TraceeContextProviderMethod.class);

                
                if (annotation != null) {
                    result.add(new MethodAnnotationPair(instance.getClass(), method, annotation));
                }

            }

        }

        return result;

    }
public static List < MethodAnnotationPair > getAnnotatedMethodsOfInstance ( final Object instance ) { List < MethodAnnotationPair > result = new ArrayList < MethodAnnotationPair > ( ) ; for ( Method method : instance . getClass ( ) . getDeclaredMethods ( ) ) { if ( checkIsPublic ( method ) && checkMethodHasNoParameters ( method ) && checkMethodHasNonVoidReturnType ( method ) ) { TraceeContextProviderMethod annotation = method . getAnnotation ( TraceeContextProviderMethod . class ) ; // check if method has no parameters and is annotated if ( annotation != null ) { result . add ( new MethodAnnotationPair ( instance . getClass ( ) , method , annotation ) ) ; } } } return result ; }
Extracts all {@link io.tracee.contextlogger.contextprovider.api.TraceeContextProviderMethod} annotated methods of the passed instance.

@param instance the instance to check for
@return a list containing all annotated methods of an instance
Extracts all { @link io . tracee . contextlogger . contextprovider . api . TraceeContextProviderMethod } annotated methods of the passed instance .