public final <T>T make(Class<T> shieldClass,H rHub,Class<H> rHubClass){
  Constructor<T> constructor=getShieldImpl(shieldClass,rHubClass);
  if (constructor == null) {
    throw new RuntimeException("Unable to find implementation for " + shieldClass);
  }
  try {
    return constructor.newInstance(rHub);
  }
 catch (  IllegalAccessException e) {
    throw new RuntimeException("Unable to invoke " + constructor,e);
  }
catch (  InstantiationException e) {
    throw new RuntimeException("Unable to invoke " + constructor,e);
  }
catch (  InvocationTargetException e) {
    Throwable cause=e.getCause();
    if (cause instanceof RuntimeException) {
      throw (RuntimeException)cause;
    }
    if (cause instanceof Error) {
      throw (Error)cause;
    }
    throw new RuntimeException("Unable to create shield instance.",cause);
  }
}

public final < T > T make ( Class < T > shieldClass , H rHub , Class < H > rHubClass ) { Constructor < T > constructor = getShieldImpl ( shieldClass , rHubClass ) ; if ( constructor == null ) { throw new RuntimeException ( "Unable to find implementation for " + shieldClass ) ; } try { return constructor . newInstance ( rHub ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( "Unable to invoke " + constructor , e ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( "Unable to invoke " + constructor , e ) ; } catch ( InvocationTargetException e ) { Throwable cause = e . getCause ( ) ; if ( cause instanceof RuntimeException ) { throw ( RuntimeException ) cause ; } if ( cause instanceof Error ) { throw ( Error ) cause ; } throw new RuntimeException ( "Unable to create shield instance." , cause ) ; } }
generates instance for a given shieldclass interface .
