/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */

package net.ranides.assira.reflection;

import net.ranides.assira.functional.VarFunction;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public interface BeanMethod {
    
    String name();
        
    VarFunction bind(Object that);

    Object apply(Object that);
    
    Object apply(Object that, Object... arguments);
    
    boolean matches(IClasses arguments);
    
    default boolean matches(IClass<?>... arguments) {
        return matches(IClasses.typeinfo(arguments));
    }
    
    default boolean matches(Class<?>... arguments) {
        return matches(IClasses.typeinfo(arguments));
    }
    
    default boolean matches() {
        return matches(IClasses.EMPTY);
    }
    
    boolean accepts(Object... arguments);
        
}
