use of org.codehaus.groovy.runtime.ProxyGeneratorAdapter in project groovy-core by groovy.
the class InlinedASTCustomizerFactory method postCompleteNode.
public Object postCompleteNode(final FactoryBuilderSupport factory, final Object parent, final Object node) {
if (node instanceof Map) {
Map map = (Map) node;
ProxyGeneratorAdapter adapter = new ProxyGeneratorAdapter(map, map.containsKey("superClass") ? (Class) map.get("superClass") : CompilationCustomizer.class, map.containsKey("interfaces") ? (Class[]) map.get("interfaces") : null, this.getClass().getClassLoader(), false, null);
Object phase = map.get("phase");
if (!(phase instanceof CompilePhase)) {
phase = CompilePhase.valueOf(phase.toString());
}
return adapter.proxy(map, phase);
}
return node;
}
use of org.codehaus.groovy.runtime.ProxyGeneratorAdapter in project groovy by apache.
the class InlinedASTCustomizerFactory method postCompleteNode.
public Object postCompleteNode(final FactoryBuilderSupport factory, final Object parent, final Object node) {
if (node instanceof Map) {
Map map = (Map) node;
ProxyGeneratorAdapter adapter = new ProxyGeneratorAdapter(map, map.containsKey("superClass") ? (Class) map.get("superClass") : CompilationCustomizer.class, map.containsKey("interfaces") ? (Class[]) map.get("interfaces") : null, this.getClass().getClassLoader(), false, null);
Object phase = map.get("phase");
if (!(phase instanceof CompilePhase)) {
phase = CompilePhase.valueOf(phase.toString());
}
return adapter.proxy(map, phase);
}
return node;
}
Aggregations