public class SnippetCompilationHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
compileAndReplaceSnippetsIn(CtType<?> initialClass)
Takes the class given as parameter, pretty-prints it, get the JDT'ast and the corrspondong Spoon AST
and finally replace all children of initialClass by the the fresh ones.
|
static <T> CtExpression<T> |
compileExpression(CtCodeSnippetExpression<T> expr) |
static CtStatement |
compileStatement(CtCodeSnippetStatement st) |
static CtStatement |
compileStatement(CtCodeSnippetStatement st,
CtTypeReference returnType) |
public static void compileAndReplaceSnippetsIn(CtType<?> initialClass)
public static CtStatement compileStatement(CtCodeSnippetStatement st) throws SnippetCompilationError
SnippetCompilationError
public static CtStatement compileStatement(CtCodeSnippetStatement st, CtTypeReference returnType) throws SnippetCompilationError
SnippetCompilationError
public static <T> CtExpression<T> compileExpression(CtCodeSnippetExpression<T> expr) throws SnippetCompilationError
SnippetCompilationError
Copyright © 2007–2021 Inria. All rights reserved.