eric-milles commented on pull request #1359:
URL: https://github.com/apache/groovy/pull/1359#issuecomment-687290137
This is the java decompilation that Groovy Console is producing for the
anonymous inner class:
```
@groovy.contracts.Contracted
public class script1599241127913$1 extends java.lang.Object implements
java.util.function.Function<C, String>, groovy.lang.GroovyObject {
final script1599241127913 this$0
static final boolean $GCONTRACTS_ENABLED
private static org.codehaus.groovy.reflection.ClassInfo $staticClassInfo
public static transient boolean __$stMC
private transient groovy.lang.MetaClass metaClass
script1599241127913$1(script1599241127913 p0) {
this$0 = p0
super()
metaClass = /*BytecodeExpression*/
}
@java.lang.Override
public java.lang.String apply(C that) {
return 'foo'
}
...
protected void invariant_script1599241127913$1() {
if ( $GCONTRACTS_ENABLED ) {
try {
if
(org.apache.groovy.contracts.generation.ContractExecutionTracker.track('script1599241127913$1',
'void invariant_script1599241127913$1()', 'invariant', false)) {
java.lang.Boolean $_gc_result = false
org.apache.groovy.contracts.ViolationTracker.init()
$_gc_result = true
if (!($_gc_result.booleanValue())) {
if
(org.apache.groovy.contracts.ViolationTracker.violationsOccurred()) {
try {
org.apache.groovy.contracts.ViolationTracker.rethrowFirst()
}
finally {
org.apache.groovy.contracts.ViolationTracker.deinit()
}
}
}
}
}
finally {
org.apache.groovy.contracts.generation.ContractExecutionTracker.clear('script1599241127913$1',
'void invariant_script1599241127913$1()', 'invariant', false)
}
}
}
...
static {
$GCONTRACTS_ENABLED =
org.apache.groovy.contracts.generation.Configurator.checkAssertionsEnabled('script1599241127913$1')
}
@groovy.transform.Generated
public volatile java.lang.Object apply(java.lang.Object param0) {
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]