@ SuppressWarnings ( { "PMD.DataflowAnomalyAnalysis" } ) /* default */ static ComponentVertex getComponentProxy ( ComponentType component , Channel componentChannel ) { ComponentProxy componentProxy = null ; try { Field field = getManagerField ( component . getClass ( ) ) ; synchronized ( component ) { if ( ! field . isAccessible ( ) ) { // NOPMD, handle problem first field . setAccessible ( true ) ; componentProxy = ( ComponentProxy ) field . get ( component ) ; if ( componentProxy == null ) { componentProxy = new ComponentProxy ( field , component , componentChannel ) ; } field . setAccessible ( false ) ; } else { componentProxy = ( ComponentProxy ) field . get ( component ) ; if ( componentProxy == null ) { componentProxy = new ComponentProxy ( field , component , componentChannel ) ; } } } } catch ( SecurityException | IllegalAccessException e ) { throw ( RuntimeException ) ( new IllegalArgumentException ( "Cannot access component's manager attribute" ) ) . initCause ( e ) ; } return componentProxy ; }
Return the component node for a component that is represented by a proxy in the tree .