private TransformerFactory getTransformerFactory()
        throws MojoFailureException, MojoExecutionException
    {
        if ( transformerFactory == null )
        {
            return TransformerFactory.newInstance();
        }

        try
        {
            return newTransformerFactory( transformerFactory, Thread.currentThread().getContextClassLoader() );
        }
        catch ( NoSuchMethodException exception )
        {
            throw new MojoFailureException( "JDK6 required when using transformerFactory parameter" );
        }
        catch ( IllegalAccessException exception )
        {
            throw new MojoExecutionException( "Cannot instantiate transformer factory", exception );
        }
        catch ( InvocationTargetException exception )
        {
            throw new MojoExecutionException( "Cannot instantiate transformer factory", exception );
        }
    }
private TransformerFactory getTransformerFactory ( ) throws MojoFailureException , MojoExecutionException { if ( transformerFactory == null ) { return TransformerFactory . newInstance ( ) ; } try { return newTransformerFactory ( transformerFactory , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; } catch ( NoSuchMethodException exception ) { throw new MojoFailureException ( "JDK6 required when using transformerFactory parameter" ) ; } catch ( IllegalAccessException exception ) { throw new MojoExecutionException ( "Cannot instantiate transformer factory" , exception ) ; } catch ( InvocationTargetException exception ) { throw new MojoExecutionException ( "Cannot instantiate transformer factory" , exception ) ; } }
Creates a new instance of {@link TransformerFactory}.