private void evaluateTriggers() {
// registering additional triggersClosure from 'triggersClosure' closure if present
Closure triggersClosure = (Closure) GrailsClassUtils.getStaticPropertyValue(getClazz(), "triggers");
TriggersConfigBuilder builder = new TriggersConfigBuilder(getFullName());
if(triggersClosure != null) {
builder.build(triggersClosure);
triggers = (Map) builder.getTriggers();
} else {
// backward compatibility
if(isCronExpressionConfigured()) {
triggers = builder.createEmbeddedCronTrigger(getStartDelay(), getCronExpression());
} else {
triggers = builder.createEmbeddedSimpleTrigger(getStartDelay(), getTimeout(), getRepeatCount());
}
}
}