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

import java.lang.annotation.Annotation;
import java.lang.invoke.MethodHandle;
import java.lang.reflect.Method;
import java.util.Set;
import java.util.function.Predicate;
import net.ranides.assira.collection.query.CQuery;
import net.ranides.assira.reflection.impl.FElements;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public interface IMethods extends IElements<IMethod> {
    
    static IMethods typeinfo(Method... methods) {
        return FElements.newMethods(methods);
    }

    static IMethods function(Object... objects) {
        return FElements.newFunctions(objects);
    }
    
    IMethods require(Predicate<? super IMethod> predicate);
    
    IMethods require(IAnnotations annotations);
    
    IMethods require(Class<? extends Annotation> annotation);
    
    IMethods require(IAttribute attribute);
    
    IMethods require(Set<IAttribute> attributes);
    
    IMethods require(String name);
    
    IMethods require(IClass<?> returns);
    
    IMethods require(IArguments arguments);
    
    IMethods require(int arguments);
    
    IMethods discard(Predicate<? super IMethod> predicate);
    
    IMethods discard(IAnnotations annotations);
    
    IMethods discard(Class<? extends Annotation> annotation);
    
    IMethods discard(IAttribute attribute);
    
    IMethods discard(Set<IAttribute> attributes);
    
    IMethods discard(String name);
        
    IMethods discard(IClass<?> returns);
    
    IMethods discard(IArguments arguments);
    
    IMethods discard(int arguments);
    
    IMethods matches(IClasses arguments);
    
    IMethods accepts(Object... arguments);
        
    IClasses returns();
    
    @Override
    IClasses parent();

    CQuery<Method> reflective();
    
    CQuery<MethodHandle> handle();
}
