/* */ public synchronized void addDeployer(Deployer deployer)
/* */ {
/* 171 */ if (deployer == null) {
/* 172 */ throw new IllegalArgumentException("Null deployer");
/* */ }
/* 174 */ DeploymentStage stage = deployer.getStage();
/* 175 */ if (stage == null) {
/* 176 */ throw new IllegalArgumentException("Deployer has no stage: " + deployer);
/* */ }
/* 178 */ addDeploymentStage(stage);
/* */
/* 180 */ DeployerWrapper wrapper = new DeployerWrapper(deployer);
/* */
/* 183 */ if (this.deployers.contains(wrapper)) {
/* 184 */ return;
/* */ }
/* 186 */ String stageName = stage.getName();
/* 187 */ List deployers = (List)this.deployersByStage.get(stageName);
/* 188 */ if (deployers == null)
/* 189 */ deployers = Collections.emptyList();
/* 190 */ deployers = insert(deployers, wrapper);
/* 191 */ this.deployersByStage.put(stageName, deployers);