@Override public final void completeStep(ResultHandler resultHandler) { if (resultHandler == null) { throw MESSAGES.nullVar("resultHandler"); } this.activeStep.resultHandler = resultHandler; // we return and executeStep picks it up }
public ChainedParameterValidator(final ParameterValidator... validators) { if (validators == null) throw MESSAGES.nullVar("validators"); this.validators = validators; }
public ChainedParameterValidator(final ParameterValidator... validators) { if (validators == null) throw MESSAGES.nullVar("validators"); this.validators = validators; }
public ParametersOfValidator(final ParametersValidator delegate) { if (delegate == null) throw MESSAGES.nullVar("delegate"); this.delegate = delegate; }
public ParametersOfValidator(final ParametersValidator delegate) { if (delegate == null) throw MESSAGES.nullVar("delegate"); this.delegate = delegate; }
@Override public final void completeStep(ResultHandler resultHandler) { if (resultHandler == null) { throw MESSAGES.nullVar("resultHandler"); } this.activeStep.resultHandler = resultHandler; // we return and executeStep picks it up }
public InetAddressMatchInterfaceCriteria(final InetAddress address) { if (address == null) throw MESSAGES.nullVar("address"); this.resolved = address; this.address = resolved.getHostAddress(); }
public InetAddressMatchInterfaceCriteria(final InetAddress address) { if (address == null) throw MESSAGES.nullVar("address"); this.resolved = address; this.address = resolved.getHostAddress(); }
@Override public <V> V detach(final AttachmentKey<V> key) { if (key == null) { throw MESSAGES.nullVar("key"); } return key.cast(valueAttachments.remove(key)); }
public static String convertPath(String abstractPath) { if (abstractPath == null) { throw MESSAGES.nullVar("abstractPath"); } if (abstractPath.length() == 0) { throw MESSAGES.emptyVar("abstractPath"); } // Use File.getAbsolutePath() to make relative paths absolute File f = new File(abstractPath); return f.getAbsolutePath(); }
protected AbstractWriteAttributeHandler(final AttributeDefinition... definitions) { assert definitions != null : MESSAGES.nullVar("definitions").getLocalizedMessage(); attributeDefinitions = new HashMap<String, AttributeDefinition>(); for (AttributeDefinition def : definitions) { attributeDefinitions.put(def.getName(), def); } this.unresolvedValueValidator = null; this.resolvedValueValidator = null; }
@Override public <V> V attach(final AttachmentKey<V> key, final V value) { if (key == null) { throw MESSAGES.nullVar("key"); } return key.cast(valueAttachments.put(key, value)); }
protected AbstractWriteAttributeHandler(final AttributeDefinition... definitions) { assert definitions != null : MESSAGES.nullVar("definitions").getLocalizedMessage(); attributeDefinitions = new HashMap<String, AttributeDefinition>(); for (AttributeDefinition def : definitions) { attributeDefinitions.put(def.getName(), def); } }
public static String convertPath(String abstractPath) { if (abstractPath == null) { throw MESSAGES.nullVar("abstractPath"); } if (abstractPath.length() == 0) { throw MESSAGES.emptyVar("abstractPath"); } // Use File.getAbsolutePath() to make relative paths absolute File f = new File(abstractPath); return f.getAbsolutePath(); }
@Override @SuppressWarnings("unchecked") public <V> V getAttachment(final AttachmentKey<V> key) { if (key == null) { throw MESSAGES.nullVar("key"); } return key.cast(valueAttachments.get(key)); }
@Override public <V> V attachIfAbsent(final AttachmentKey<V> key, final V value) { if (key == null) { throw MESSAGES.nullVar("key"); } return key.cast(valueAttachments.putIfAbsent(key, value)); }
@Override public <V> V attach(final AttachmentKey<V> key, final V value) { if (key == null) { throw MESSAGES.nullVar("key"); } return key.cast(valueAttachments.put(key, value)); }
@Override public <V> V attachIfAbsent(final AttachmentKey<V> key, final V value) { if (key == null) { throw MESSAGES.nullVar("key"); } return key.cast(valueAttachments.putIfAbsent(key, value)); }
@Override public final void completeStep(RollbackHandler rollbackHandler) { if (rollbackHandler == null) { throw MESSAGES.nullVar("rollbackHandler"); } if (rollbackHandler == RollbackHandler.NOOP_ROLLBACK_HANDLER) { completeStep(ResultHandler.NOOP_RESULT_HANDLER); } else { completeStep(new RollbackDelegatingResultHandler(rollbackHandler)); } // we return and executeStep picks it up }
@Override public final void completeStep(RollbackHandler rollbackHandler) { if (rollbackHandler == null) { throw MESSAGES.nullVar("rollbackHandler"); } if (rollbackHandler == RollbackHandler.NOOP_ROLLBACK_HANDLER) { completeStep(ResultHandler.NOOP_RESULT_HANDLER); } else { completeStep(new RollbackDelegatingResultHandler(rollbackHandler)); } // we return and executeStep picks it up }