use of il.org.spartan.Leonidas.plugin.leonidas.Replacer in project Main by SpartanRefactoring.
the class Method method create.
@Override
public GenericEncapsulator create(Encapsulator e, Map<Integer, List<Matcher.Constraint>> map) {
Method m = new Method(e);
Encapsulator returnType = Pruning.prune(Encapsulator.buildTreeFromPsi(az.method(e.getInner()).getReturnTypeElement()), map);
Encapsulator parameters = Pruning.prune(Encapsulator.buildTreeFromPsi(az.method(e.getInner()).getParameterList()), map);
Encapsulator codeBlock = Pruning.prune(Encapsulator.buildTreeFromPsi(az.method(e.getInner()).getBody()), map);
m.matcherReturnType = new Matcher(Utils.wrapWithList(returnType), map);
m.matcherParameters = new Matcher(Utils.wrapWithList(parameters), map);
m.matcherCodeBlock = new Matcher(Utils.wrapWithList(codeBlock), map);
m.replacerReturnType = new Replacer(Utils.wrapWithList(returnType));
m.replacerParameters = new Replacer(Utils.wrapWithList(parameters));
m.replacerCodeBlock = new Replacer(Utils.wrapWithList(codeBlock));
return m;
}