@Override
    public CompilationCustomizer create() {
        final Map<String, Object> annotationParams = new HashMap<>();
        if (extensions != null && !extensions.isEmpty()) {
            if (extensions.contains(","))
                annotationParams.put("extensions", Stream.of(extensions.split(",")).collect(Collectors.toList()));
            else
                annotationParams.put("extensions", Collections.singletonList(extensions));
        }

        return new ASTTransformationCustomizer(annotationParams, CompileStatic.class);
    }
Injects the {@code CompileStatic} transformer to enable type validation on script execution.

@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompileStaticGroovyCustomizer.java