@Override
  public Processor getProcessor(final String name) {
    if (name.indexOf(':') > -1) {
      final String[] parts = name.split(":");
      return getProcessor(parts[0], parts[1]);
    }
    Processor processor = this.processors.get(name);
    if (processor == null) {
      final String lname = name.toLowerCase();
      final String pname = StringUtils.capitalize(lname) + "Processor";
      try {
        processor = (Processor) Class.forName(
            "de.matrixweb.smaller." + lname + "." + pname).newInstance();
        this.processors.put(name, processor);
      } catch (final InstantiationException e) {
        LOGGER.warn("Ignoring invalid processor " + name, e);
      } catch (final IllegalAccessException e) {
        LOGGER.warn("Ignoring invalid processor " + name, e);
      } catch (final ClassNotFoundException e) {
        LOGGER.warn("Ignoring invalid processor " + name, e);
      }
    }
    return processor;
  }
@ Override public Processor getProcessor ( final String name ) { if ( name . indexOf ( ':' ) > - 1 ) { final String [ ] parts = name . split ( ":" ) ; return getProcessor ( parts [ 0 ] , parts [ 1 ] ) ; } Processor processor = this . processors . get ( name ) ; if ( processor == null ) { final String lname = name . toLowerCase ( ) ; final String pname = StringUtils . capitalize ( lname ) + "Processor" ; try { processor = ( Processor ) Class . forName ( "de.matrixweb.smaller." + lname + "." + pname ) . newInstance ( ) ; this . processors . put ( name , processor ) ; } catch ( final InstantiationException e ) { LOGGER . warn ( "Ignoring invalid processor " + name , e ) ; } catch ( final IllegalAccessException e ) { LOGGER . warn ( "Ignoring invalid processor " + name , e ) ; } catch ( final ClassNotFoundException e ) { LOGGER . warn ( "Ignoring invalid processor " + name , e ) ; } } return processor ; }
@see de.matrixweb.smaller.resource.ProcessorFactory#getProcessor(java.lang.String)