All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.vyarus.guicey.jdbi3.module.NoSyntheticMatcher Maven / Gradle / Ivy

package ru.vyarus.guicey.jdbi3.module;

import com.google.inject.matcher.Matcher;

import java.lang.reflect.Method;

/**
 * Matcher to filter synthetic methods (to avoid warnings on aop proxies creation).
 *
 * @author Vyacheslav Rusakov
 * @since 17.09.2018
 */
public class NoSyntheticMatcher implements Matcher {

    private static final NoSyntheticMatcher NO_SYNTHETIC_MATCHER = new NoSyntheticMatcher();

    /**
     * @return method matcher for filtering synthetic methods
     */
    public static final NoSyntheticMatcher instance() {
        return NO_SYNTHETIC_MATCHER;
    }

    @Override
    public boolean matches(final Method method) {
        return !method.isSynthetic();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy