MCPcopy Create free account
hub / github.com/apache/groovy / isScript

Method isScript

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

Returns whether this ClassNode represents a Groovy script body. A script is a special class that executes at the top level rather than requiring instantiation. This method checks both the direct flag and whether the class derives from Script. During compilation, script bodies are com

()

Source from the content-addressed store, hash-verified

2183 * @see #isDerivedFrom(ClassNode)
2184 */
2185 public boolean isScript() {
2186 return redirect().script || isDerivedFrom(ClassHelper.SCRIPT_TYPE);
2187 }
2188
2189 /**
2190 * Marks this {@link ClassNode} as a script or removes the script flag.

Callers 6

visitMethod · 0.95
visitMethod · 0.45
changeBaseScriptTypeMethod · 0.45

Calls 2

redirectMethod · 0.95
isDerivedFromMethod · 0.95

Tested by

no test coverage detected