private Field filterFields(Field[] fields, Class type) throws /*NoSuchFieldException,*/ TooManyMatchesException
    {
        ArrayList<Field> list = new ArrayList<Field>();
        for(Field f : fields)
        {
            if(!f.getType().equals(type))
            {
                continue;
            }
            list.add(f);
        }
        Field[] array = list.toArray(new Field[0]);
        if(array.length == 0)
        {
            // throw new NoSuchFieldException("No matching field found on class " + _className + ".");
            return null;
        }
        if(array.length > 1)
        {
            String msg = "Fields " + array[0].getName();
            for(int i = 1; i < array.length - 1; i++)
            {
                msg += ", " + array[i].getName();
            }
            msg += "and " + array[array.length - 1].getName() + " match on class " + _className + ".";
            throw new TooManyMatchesException(msg);
        }
        // array[0].setAccessible(true);
        return array[0];
    }