Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Matches on the declaring type of a field, method, or property. See methodCall enclosingCall and hasArgument for an example.

...

Matches on the value of an argument or annotation attribute. See hasAttribute and hasArgument for examples. If the matched value is bound to a name, then the value is reified. This means that the value can be used inside of the DSLD as a primitive or a string. For example:

Code Block
contribute(methodCallenclosingCall(hasArgument(name("flar") & bind(vals : value())))) {
	vals.each { val -> 
		if (val > 9) {
			log "val is greater than 9"
		} else {
			log "val is less than 9"
		}
}

...