@Override
    public <A extends Annotation> Object getValue(Class<A> type, String name) {

        try {
            Method valueMethod = type.getMethod(name);

            if (!annotationValues.containsKey(valueMethod)) {
                // Fill in annotation value
                try {
                    A annotation = executor.getClass().getMethod("invoke", FunctionInvocation.class, Object[].class).getAnnotation(type);
                    if (annotation != null) {
                        Object value = valueMethod.invoke(annotation);
                        annotationValues.put(valueMethod, value);
                        return value;
                    }
                } catch (NoSuchMethodException e) {
                    LOGGER.log(Level.SEVERE, "Programmer's fault: Can't find invoke() method (should be defined by interface)", e);
                } catch (IllegalAccessException e) {
                    LOGGER.log(Level.SEVERE, "No access to annotation method because it's not public; What the ... ?", e);
                } catch (InvocationTargetException e) {
                    LOGGER.log(Level.SEVERE, "Can't invoke annotation method", e);
                }

                // Fill in default value
                Object value = valueMethod.getDefaultValue();
                annotationValues.put(valueMethod, value);
                return value;
            }

            // Return stored value
            return annotationValues.get(valueMethod);
        } catch (NoSuchMethodException e) {
            LOGGER.log(Level.WARNING, "Tried to access not existing annotation method for getting annotation value", e);
            return null;
        }
    }