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

package net.ranides.assira.reflection.util;

import java.lang.annotation.Annotation;
import java.util.Map;
import net.ranides.assira.collection.maps.HashMap;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public final class AnnotationBuilder<T extends Annotation> {
    
    private final Class<T> type;
    
    private final Map<String,Object> params = new HashMap<>();

    public AnnotationBuilder(Class<T> type) {
        this.type = type;
    }
    
    public AnnotationBuilder<T> param(String name, Object value) {
        params.put(name, value);
        return this;
    }
    
    public T result() {
        return AnnotationUtils.make(type, params);
    }
    
}
