protected < T extends BaseProxy > AutoBean < T > createProxy ( final Class < T > clazz , final SimpleProxyId < T > id , final boolean useAppendedContexts ) { AutoBean < T > created = null ; if ( useAppendedContexts ) { for ( final AbstractRequestContext ctx : this . state . appendedContexts ) { created = ctx . getAutoBeanFactory ( ) . create ( clazz ) ; if ( created != null ) { break ; } } } else { created = this . getAutoBeanFactory ( ) . create ( clazz ) ; } if ( created != null ) { created . setTag ( STABLE_ID , id ) ; return created ; } throw new IllegalArgumentException ( "Unknown proxy type " + clazz . getName ( ) ) ; }
Creates a new proxy with an assigned ID .