public T build(Application application) throws IOException {
  this.application=application;
  if (handler == null) {
    throw new IllegalArgumentException("handler == null");
  }
  if (constructorArgTypes.length != constructorArgValues.length) {
    throw new IllegalArgumentException("constructorArgValues.length != constructorArgTypes.length");
  }
  Class<? extends T> proxyClass=buildProxyClass();
  if (proxyClass == null) {
    return null;
  }
  Constructor<? extends T> constructor=null;
  try {
    constructor=proxyClass.getConstructor(constructorArgTypes);
  }
 catch (  NoSuchMethodException e) {
    Constructor[] constructors=proxyClass.getConstructors();
    for (    Constructor constructor2 : constructors) {
      if (constructor2.getGenericParameterTypes().length == constructorArgTypes.length) {
        constructor=constructor2;
        break;
      }
    }
  }
  T result;
  try {
    result=constructor.newInstance(constructorArgValues);
  }
 catch (  InstantiationException e) {
    throw new AssertionError(e);
  }
catch (  IllegalAccessException e) {
    throw new AssertionError(e);
  }
catch (  InvocationTargetException e) {
    throw launderCause(e);
  }
  setHandlerInstanceField(result,handler);
  return result;
}

public T build ( Application application ) throws IOException { this . application = application ; if ( handler == null ) { throw new IllegalArgumentException ( "handler == null" ) ; } if ( constructorArgTypes . length != constructorArgValues . length ) { throw new IllegalArgumentException ( "constructorArgValues.length != constructorArgTypes.length" ) ; } Class < ? extends T > proxyClass = buildProxyClass ( ) ; if ( proxyClass == null ) { return null ; } Constructor < ? extends T > constructor = null ; try { constructor = proxyClass . getConstructor ( constructorArgTypes ) ; } catch ( NoSuchMethodException e ) { Constructor [ ] constructors = proxyClass . getConstructors ( ) ; for ( Constructor constructor2 : constructors ) { if ( constructor2 . getGenericParameterTypes ( ) . length == constructorArgTypes . length ) { constructor = constructor2 ; break ; } } } T result ; try { result = constructor . newInstance ( constructorArgValues ) ; } catch ( InstantiationException e ) { throw new AssertionError ( e ) ; } catch ( IllegalAccessException e ) { throw new AssertionError ( e ) ; } catch ( InvocationTargetException e ) { throw launderCause ( e ) ; } setHandlerInstanceField ( result , handler ) ; return result ; }
create a new instance of the class to proxy .
