linter/src/main/java/org/apache/royale/linter/config/ConfigurationInfo.java [355:413]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected final void setSetterMethod(Method setter)
    {
        Class<?>[] pt = setter.getParameterTypes();

        assert (pt.length >= 2) : ("coding error: config setter must take at least 2 args!");

        this.setter = setter;

        if (pt.length == 2)
        {
            Class<?> c = pt[1];

            if (ConfigurationBuffer.isSupportedListType(c))
            {
                if (argcount == NOT_SET)
                    argcount = -1; // infinite list

                argtypes = new Class[] {String.class};
                return;
            }
            else if (ConfigurationBuffer.isSupportedValueType(c))
            {
                assert (argcount == NOT_SET) : ("coding error: value object setter cannot override argcount");
                assert (argnames == null) : ("coding error: value object setter cannot override argnames");

                Field[] fields = c.getFields();

                argcount = fields.length;

                assert (argcount > 0) : ("coding error: " + setter + " value object " + c.getName() + " must contain at least one public field");

                argnames = new String[fields.length];
                argtypes = new Class[fields.length];

                for (int f = 0; f < fields.length; ++f)
                {
                    argnames[f] = ConfigurationBuffer.c2h(fields[f].getName());
                    argtypes[f] = fields[f].getType();
                }
                return;
            }
        }

        assert ((argcount == NOT_SET) || (argcount == pt.length - 1)) : ("coding error: the argument count must match the number of setter arguments");
        // We've taken care of lists and value objects, from here on out, it must match the parameter list.

        argcount = pt.length - 1;

        DefaultArgumentValue defaultArgValuesAnno = setter.getAnnotation(DefaultArgumentValue.class);
        if (defaultArgValuesAnno != null)
            defaultArgValues = defaultArgValuesAnno.value();

        argtypes = new Class[pt.length - 1];
        for (int i = 1; i < pt.length; ++i)
        {
            assert (ConfigurationBuffer.isSupportedSimpleType(pt[i])) : ("coding error: " + setter.getClass().getName() + "." + setter.getName() + " parameter " + i + " is not a supported type!");
            argtypes[i - 1] = pt[i];
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



compiler-common/src/main/java/org/apache/royale/compiler/config/ConfigurationInfo.java [355:413]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected final void setSetterMethod(Method setter)
    {
        Class<?>[] pt = setter.getParameterTypes();

        assert (pt.length >= 2) : ("coding error: config setter must take at least 2 args!");

        this.setter = setter;

        if (pt.length == 2)
        {
            Class<?> c = pt[1];

            if (ConfigurationBuffer.isSupportedListType(c))
            {
                if (argcount == NOT_SET)
                    argcount = -1; // infinite list

                argtypes = new Class[] {String.class};
                return;
            }
            else if (ConfigurationBuffer.isSupportedValueType(c))
            {
                assert (argcount == NOT_SET) : ("coding error: value object setter cannot override argcount");
                assert (argnames == null) : ("coding error: value object setter cannot override argnames");

                Field[] fields = c.getFields();

                argcount = fields.length;

                assert (argcount > 0) : ("coding error: " + setter + " value object " + c.getName() + " must contain at least one public field");

                argnames = new String[fields.length];
                argtypes = new Class[fields.length];

                for (int f = 0; f < fields.length; ++f)
                {
                    argnames[f] = ConfigurationBuffer.c2h(fields[f].getName());
                    argtypes[f] = fields[f].getType();
                }
                return;
            }
        }

        assert ((argcount == NOT_SET) || (argcount == pt.length - 1)) : ("coding error: the argument count must match the number of setter arguments");
        // We've taken care of lists and value objects, from here on out, it must match the parameter list.

        argcount = pt.length - 1;

        DefaultArgumentValue defaultArgValuesAnno = setter.getAnnotation(DefaultArgumentValue.class);
        if (defaultArgValuesAnno != null)
            defaultArgValues = defaultArgValuesAnno.value();

        argtypes = new Class[pt.length - 1];
        for (int i = 1; i < pt.length; ++i)
        {
            assert (ConfigurationBuffer.isSupportedSimpleType(pt[i])) : ("coding error: " + setter.getClass().getName() + "." + setter.getName() + " parameter " + i + " is not a supported type!");
            argtypes[i - 1] = pt[i];
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



formatter/src/main/java/org/apache/royale/formatter/config/ConfigurationInfo.java [355:413]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected final void setSetterMethod(Method setter)
    {
        Class<?>[] pt = setter.getParameterTypes();

        assert (pt.length >= 2) : ("coding error: config setter must take at least 2 args!");

        this.setter = setter;

        if (pt.length == 2)
        {
            Class<?> c = pt[1];

            if (ConfigurationBuffer.isSupportedListType(c))
            {
                if (argcount == NOT_SET)
                    argcount = -1; // infinite list

                argtypes = new Class[] {String.class};
                return;
            }
            else if (ConfigurationBuffer.isSupportedValueType(c))
            {
                assert (argcount == NOT_SET) : ("coding error: value object setter cannot override argcount");
                assert (argnames == null) : ("coding error: value object setter cannot override argnames");

                Field[] fields = c.getFields();

                argcount = fields.length;

                assert (argcount > 0) : ("coding error: " + setter + " value object " + c.getName() + " must contain at least one public field");

                argnames = new String[fields.length];
                argtypes = new Class[fields.length];

                for (int f = 0; f < fields.length; ++f)
                {
                    argnames[f] = ConfigurationBuffer.c2h(fields[f].getName());
                    argtypes[f] = fields[f].getType();
                }
                return;
            }
        }

        assert ((argcount == NOT_SET) || (argcount == pt.length - 1)) : ("coding error: the argument count must match the number of setter arguments");
        // We've taken care of lists and value objects, from here on out, it must match the parameter list.

        argcount = pt.length - 1;

        DefaultArgumentValue defaultArgValuesAnno = setter.getAnnotation(DefaultArgumentValue.class);
        if (defaultArgValuesAnno != null)
            defaultArgValues = defaultArgValuesAnno.value();

        argtypes = new Class[pt.length - 1];
        for (int i = 1; i < pt.length; ++i)
        {
            assert (ConfigurationBuffer.isSupportedSimpleType(pt[i])) : ("coding error: " + setter.getClass().getName() + "." + setter.getName() + " parameter " + i + " is not a supported type!");
            argtypes[i - 1] = pt[i];
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



