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

com.github.datalking.aop.TrueMethodMatcher Maven / Gradle / Ivy

The newest version!
package com.github.datalking.aop;

import java.io.Serializable;
import java.lang.reflect.Method;

/**
 * @author yaoo on 4/18/18
 */
public class TrueMethodMatcher implements MethodMatcher, Serializable {

    public static final TrueMethodMatcher INSTANCE = new TrueMethodMatcher();

    private TrueMethodMatcher() {
    }


    @Override
    public boolean isRuntime() {
        return false;
    }

    @Override
    public boolean matches(Method method, Class targetClass) {
        return true;
    }


    @Override
    public boolean matches(Method method, Class targetClass, Object... args) {
        throw new UnsupportedOperationException();
    }

    private Object readResolve() {
        return INSTANCE;
    }

    @Override
    public String toString() {
        return "MethodMatcher.TRUE";
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy