class Java10PostProcessor extends PostProcessors {
    
    // List of parent contexts in which a var type must not be detected.
    // for example: in this statement var.class.getCanonicalName(), var must not be considered as a VarType
    private static List<Class> FORBIDEN_PARENT_CONTEXT_TO_DETECT_POTENTIAL_VAR_TYPE = new ArrayList<>();
    static {
        FORBIDEN_PARENT_CONTEXT_TO_DETECT_POTENTIAL_VAR_TYPE.addAll(Arrays.asList(ClassExpr.class));
    }

    protected final Processor varNodeCreator = new Processor() {

        @Override
        public void postProcess(ParseResult<? extends Node> result, ParserConfiguration configuration) {<FILL_FUNCTION_BODY>}
        
        private boolean matchForbiddenContext(ClassOrInterfaceType cit) {
            return cit.getParentNode().isPresent()
                    && FORBIDEN_PARENT_CONTEXT_TO_DETECT_POTENTIAL_VAR_TYPE.stream().anyMatch(cl -> cl.isInstance(cit.getParentNode().get()));
        }
    };
    

    public Java10PostProcessor() {
        add(varNodeCreator);
    }
}

            result.getResult().ifPresent(node -> {
                node.findAll(ClassOrInterfaceType.class)
                    .forEach(n -> {
                        if ("var".equals(n.getNameAsString())
                                && !matchForbiddenContext(n)) {
                            n.replace(new VarType(n.getTokenRange().orElse(null)));
                        }
                });
            });
        
<methods>public transient void <init>(com.github.javaparser.Processor[]) ,public com.github.javaparser.ast.validator.postprocessors.PostProcessors add(com.github.javaparser.Processor) ,public List<com.github.javaparser.Processor> getPostProcessors() ,public void postProcess(ParseResult<? extends com.github.javaparser.ast.Node>, com.github.javaparser.ParserConfiguration) ,public com.github.javaparser.ast.validator.postprocessors.PostProcessors remove(com.github.javaparser.Processor) ,public com.github.javaparser.ast.validator.postprocessors.PostProcessors replace(com.github.javaparser.Processor, com.github.javaparser.Processor) <variables>private final List<com.github.javaparser.Processor> postProcessors