@SuppressWarnings("unchecked") public Class<? extends C> getOutput() { Class<?> output = super.getOutput(); if (output == null) throw new IllegalStateException("No output for " + this); return (Class<? extends C>) output; }
/** * Create a new AbstractRealDeployerWithInput. * * @param input the input */ public AbstractRealDeployerWithInput(Class<T> input) { setInput(input); }
public void internalUndeploy(DeploymentUnit unit) { undeploy(unit, visitor); } }
public void internalDeploy(DeploymentUnit unit) throws DeploymentException { super.internalDeploy(unit); try { deployComponents(unit); } catch (Throwable t) { super.internalUndeploy(unit); throw DeploymentException.rethrowAsDeploymentException("Error deploying: " + unit.getName(), t); } }
public void internalDeploy(DeploymentUnit unit) throws DeploymentException { if (visitor == null) { if (warned == false) { log.error("INTERNAL ERROR: Visitor is null for " + getClass().getName()); warned = true; } return; } deploy(unit, visitor); }
public void internalUndeploy(DeploymentUnit unit) { undeployComponents(unit); super.internalUndeploy(unit); }
/** * Set the deployment visitor * * @param visitor the visitor * @throws IllegalArgumentException if the visitor is null */ protected void setDeploymentVisitor(DeploymentVisitor<T> visitor) { if (visitor == null) throw new IllegalArgumentException("Null visitor"); this.visitor = visitor; Class<T> input = visitor.getVisitorType(); if (input == null) throw new IllegalArgumentException("Null visitor type"); setInput(input); }