private void invoke()

in commons-digester3-core/src/main/java/org/apache/commons/digester3/AbstractMethodRule.java [142:188]


    private void invoke()
        throws Exception
    {
        // Identify the objects to be used
        final Object child = getChild();
        final Object parent = getParent();
        if ( getDigester().getLogger().isDebugEnabled() )
        {
            if ( parent == null )
            {
                getDigester().getLogger().debug( format( "[%s]{%s} Call [NULL PARENT].%s(%s)",
                                                         getClass().getSimpleName(),
                                                         getDigester().getMatch(),
                                                         methodName,
                                                         child ) );
            }
            else
            {
                getDigester().getLogger().debug( format( "[%s]{%s} Call %s.%s(%s)",
                                                         getClass().getSimpleName(),
                                                         getDigester().getMatch(),
                                                         parent.getClass().getName(),
                                                         methodName,
                                                         child ) );
            }
        }

        // Call the specified method
        final Class<?>[] paramTypes = new Class<?>[1];
        if ( paramType != null )
        {
            paramTypes[0] = getDigester().getClassLoader().loadClass( paramTypeName );
        }
        else
        {
            paramTypes[0] = child.getClass();
        }

        if ( useExactMatch )
        {
            invokeExactMethod( parent, methodName, new Object[] { child }, paramTypes );
        }
        else
        {
            invokeMethod( parent, methodName, new Object[] { child }, paramTypes );
        }
    }