Class StaticCompilationVisitor

  • All Implemented Interfaces:
    GroovyClassVisitor, GroovyCodeVisitor, ErrorCollecting

    public class StaticCompilationVisitor
    extends StaticTypeCheckingVisitor
    This visitor is responsible for amending the AST with static compilation metadata or transform the AST so that a class or a method can be statically compiled. It may also throw errors specific to static compilation which are not considered as an error at the type check pass. For example, usage of spread operator is not allowed in statically compiled portions of code, while it may be statically checked. Static compilation relies on static type checking, which explains why this visitor extends the type checker visitor.