logger.debug(new StringBuilder().append("Adapting ").append(this.specification.getClass()).append(" to ").append(Predicate.class));
try {
Object tmp = this.specificationMethod.invoke(specification, object);
if (!(tmp instanceof Boolean)) {
throw new SpecificationAdapterException(this.specificationMethod.toString() + " must return a boolean value.");
}
else {
result = (Boolean) tmp;
}
}
catch(Exception ex) {
throw new SpecificationAdapterException("Error while calling: " + this.specificationMethod.toString(), ex);
}
return result;
}