use of ast.ExpCore.ClassB in project L42 by ElvisResearchGroup.
the class _Aux method withMember.
static ClassB withMember(ClassB cb, Member m) {
assert cb.isConsistent();
List<Member> newMs = new java.util.ArrayList<>(cb.getMs());
int index = _Aux.getIndex(newMs, m);
if (index == -1) {
newMs.add(m);
} else {
newMs.set(index, m);
}
ClassB result = cb.withMs(newMs);
return result;
}
use of ast.ExpCore.ClassB in project L42 by ElvisResearchGroup.
the class Plugin method MremoveImplementation£xthat£xpath.
@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MremoveImplementation£xthat£xpath(Object _that, Object _path) {
ClassB that = ensureExtractClassB(_that);
List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
return Abstract.toAbstract(that, path);
}
use of ast.ExpCore.ClassB in project L42 by ElvisResearchGroup.
the class Plugin method MsumMethods£xthat£xpath£xsrc1£xsrc2£xdest£xname.
@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MsumMethods£xthat£xpath£xsrc1£xsrc2£xdest£xname(Object _that, Object _path, Object _src1, Object _src2, Object _dest, Object _name) {
ClassB that = ensureExtractClassB(_that);
String name = ensureExtractStringU(_name);
List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
MethodSelector src1 = MethodSelector.parse(ensureExtractStringU(_src1));
MethodSelector src2 = MethodSelector.parse(ensureExtractStringU(_src2));
MethodSelector dest = MethodSelector.parse(ensureExtractStringU(_dest));
return SumMethods.sumMethods(that, path, src1, src2, dest, name);
}
use of ast.ExpCore.ClassB in project L42 by ElvisResearchGroup.
the class Plugin method MaddDocumentation£xthat£xpath£xselector£xdoc.
@ActionType({ ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library, ActionType.NormType.Library })
public Object MaddDocumentation£xthat£xpath£xselector£xdoc(Object _that, Object _path, Object _sel, Object _doc) {
ClassB that = ensureExtractClassB(_that);
List<Ast.C> path = PathAux.parseValidCs(ensureExtractStringU(_path));
MethodSelector sel = MethodSelector.parse(ensureExtractStringU(_sel));
Doc doc = ensureExtractDoc(_doc);
return AddDocumentation.addDocumentationOnMethod(Resources.getP(), that, path, sel, doc);
}
use of ast.ExpCore.ClassB in project L42 by ElvisResearchGroup.
the class Plugin method MdeployCode£xthat£xurl.
@ActionType({ ActionType.NormType.Void, ActionType.NormType.Library, ActionType.NormType.Library })
public Resources.Void MdeployCode£xthat£xurl(Object _that, Object _url) {
ClassB that = ensureExtractClassB(_that);
String url = ensureExtractStringU(_url);
String text = sugarVisitors.ToFormattedText.of(that);
java.nio.file.Path p = Paths.get(url);
try {
Files.write(p, text.getBytes());
} catch (IOException e) {
throw new Error(e);
}
return Resources.Void.instance;
}
Aggregations