+ Component client = findComponent(aComponent);
+ if ( client == null ) {
+ throw new SystemAssemblyException(getQualifiedName() + ": No component '" + aComponent + "' in the container");
+ }
+ if ( aRequiredInterface != null ) {
+ if ( findInterface(client.getRequiredInterfaces(), aRequiredInterface) == null ) {
+ throw new SystemAssemblyException(
+ getQualifiedName() + ": Component '" + aComponent + "' does not have a required interface named '"
+ + aRequiredInterface + "'");
+ }
+ }
+ if ( aExternalRequiredInterface != null) {
+ if ( findInterface(getRequiredInterfaces(), aExternalRequiredInterface) == null ) {
+ throw new SystemAssemblyException(
+ getQualifiedName() + ": container does not have a required interface named '"
+ + aExternalRequiredInterface + "'");
+ }
+ }