public CallMethodBuilder withParamCount()

in commons-digester3-core/src/main/java/org/apache/commons/digester3/binder/CallMethodBuilder.java [94:120]


    public CallMethodBuilder withParamCount( final int paramCount )
    {
        if ( paramCount < 0 )
        {
            reportError( format( "callMethod(\"%s\").withParamCount(int)", this.methodName ),
                              "negative parameters counter not allowed" );
        }

        this.paramCount = paramCount;

        if ( this.paramCount == 0 )
        {
            if ( this.paramTypes == null || this.paramTypes.length != 1 )
            {
                this.paramTypes = new Class<?>[] { String.class };
            }
        }
        else
        {
            this.paramTypes = new Class<?>[this.paramCount];
            for ( int i = 0; i < paramTypes.length; i++ )
            {
                this.paramTypes[i] = String.class;
            }
        }
        return this;
    }