class DefaultAopMethodAuthorizeDefinitionParser implements AopMethodAuthorizeDefinitionParser {

    private final Map<CacheKey, AuthorizeDefinition> cache = new ConcurrentHashMap<>();

    private List<AopMethodAuthorizeDefinitionCustomizerParser> parserCustomizers;

    private static final Set<String> excludeMethodName = new HashSet<>(Arrays.asList("toString", "clone", "hashCode", "getClass"));

    @Autowired(required = false)
    public void setParserCustomizers(List<AopMethodAuthorizeDefinitionCustomizerParser> parserCustomizers) {
        this.parserCustomizers = parserCustomizers;
    }

    @Override
    public List<AuthorizeDefinition> getAllParsed() {
        return new ArrayList<>(cache.values());
    }

    @Override
    @SuppressWarnings("all")
    public AuthorizeDefinition parse(Class<?> target, Method method, MethodInterceptorContext context) {<FILL_FUNCTION_BODY>}

    public CacheKey buildCacheKey(Class<?> target, Method method) {
        return new CacheKey(ClassUtils.getUserClass(target), method);
    }

    @EqualsAndHashCode
    static class CacheKey {
        private final Class<?> type;
        private final Method method;

        public CacheKey(Class<?> type, Method method) {
            this.type = type;
            this.method = method;
        }
    }

    public void destroy() {
        cache.clear();
    }

    static boolean isIgnoreMethod(Method method) {
        //不是public的方法
        if(!Modifier.isPublic(method.getModifiers())){
            return true;
        }
        //没有以下注解
        return null == AnnotatedElementUtils.findMergedAnnotation(method, RequestMapping.class)
                && null == AnnotatedElementUtils.findMergedAnnotation(method, ResourceAction.class);
    }

}

        if (excludeMethodName.contains(method.getName())) {
            return null;
        }
        CacheKey key = buildCacheKey(target, method);

        AuthorizeDefinition definition = cache.get(key);
        if (definition instanceof EmptyAuthorizeDefinition) {
            return null;
        }
        if (null != definition) {
            return definition;
        }
        //使用自定义
        if (!CollectionUtils.isEmpty(parserCustomizers)) {
            definition = parserCustomizers
                    .stream()
                    .map(customizer -> customizer.parse(target, method, context))
                    .filter(Objects::nonNull)
                    .findAny().orElse(null);
            if (definition instanceof EmptyAuthorizeDefinition) {
                return null;
            }
            if (definition != null) {
                return definition;
            }
        }

        Authorize annotation = AnnotationUtils.findAnnotation(target, method, Authorize.class);

        if (isIgnoreMethod(method) || (annotation != null && annotation.ignore())) {
            cache.put(key, EmptyAuthorizeDefinition.instance);
            return null;
        }
        synchronized (cache) {
            return cache.computeIfAbsent(key, (__) -> {
                return DefaultBasicAuthorizeDefinition.from(target, method);
            });
        }
    
<no_super_class>