MCPcopy Index your code
hub / github.com/apache/groovy / isScriptBody

Method isScriptBody

src/main/java/org/codehaus/groovy/ast/ClassNode.java:2216–2218  ·  view source on GitHub ↗

Returns whether this inner class or closure was declared inside a script body. This flag distinguishes between inner classes/closures defined within a script's top-level code versus those defined within regular class methods. Script body context affects how local variable access and scoping rules ar

()

Source from the content-addressed store, hash-verified

2214 * @see #isStaticClass()
2215 */
2216 public boolean isScriptBody() {
2217 return redirect().scriptBody;
2218 }
2219
2220 /**
2221 * Marks this inner class or closure as being declared inside a script body.

Callers 12

addClassMethod · 0.95
existsPropertyMethod · 0.95
isContractsCandidateMethod · 0.45
callMethod · 0.45
filterMethodsMethod · 0.45
isInScriptBodyMethod · 0.45
visitMethodMethod · 0.45
changeBaseScriptTypeMethod · 0.45

Calls 1

redirectMethod · 0.95

Tested by

no test coverage detected