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
()
| 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. |
no test coverage detected