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

package net.ranides.assira.reflection.impl;

import java.lang.reflect.Parameter;
import java.util.Map;
import net.ranides.assira.reflection.IArgument;
import net.ranides.assira.reflection.IClass;
import net.ranides.assira.reflection.IContext;
import net.ranides.assira.reflection.IMethod;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public final class FArgument {
    
    private FArgument() {
        /* utility class */
    }

    public static CArgument newArgument(String name, IClass<?> type) {
        return new CArgument(name, type);
    }
    
    public static CArgument newArgument(Class<?> type) {
        return newArgument(null, IClass.typeinfo(type));
    }

    public static CArgument newArgument(IClass<?> type) {
        return newArgument(null, type);
    }

    public static CArgument newArgument(Map.Entry<String, IClass<?>> entry) {
        return newArgument(entry.getKey(), entry.getValue());
    }
    
    public static IArgument newArgument(IContext context, AMethod parent, Parameter param, int index) {
        return new RArgument(context, parent, param, index);
    }
    
}
