/*
 * @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.reflect.Field;
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 IFields extends IElements<IField> {
    
    static IFields typeinfo(Field... fields) {
        return FElements.newFields(fields);
    }
    
    IFields require(Predicate<? super IField> predicate);
    
    IFields require(IAnnotations annotations);
    
    IFields require(Class<? extends Annotation> annotation);
    
    IFields require(IClass<?> type);
    
    IFields require(IAttribute attribute);
    
    IFields require(Set<IAttribute> attributes);
    
    IFields require(String name);
    
    IFields discard(Predicate<? super IField> predicate);
    
    IFields discard(IAnnotations annotations);
    
    IFields discard(Class<? extends Annotation> annotation);
    
    IFields discard(IClass<?> type);
        
    IFields discard(IAttribute attribute);
    
    IFields discard(Set<IAttribute> attributes);
    
    IFields discard(String name);
    
    IClasses type();
    
    @Override
    IClasses parent();
    
    CQuery<Field> reflective();
    
}
