use of platformSpecific.fakeInternet.PluginWithPart in project L42 by ElvisResearchGroup.
the class PlgWrapperGenerator method plgComplete1.
public static ClassB plgComplete1(List<Ast.C> cs, Program p, ClassB l) throws UnresolvedOverloading, ClassUnfit, MethodUnfit {
PluginWithPart pwp = OnLineCode._isPluginWithPart(l.getDoc1());
if (pwp == null) {
return l;
}
PlgInfo plgInfo = new PlgInfo(l.getDoc1());
if (!hasPluginUnresponsive(l)) {
throw new RefactorErrors.ClassUnfit().msg("Class " + Path.outer(0, cs) + " does not contain method #pluginUnresponsive(binaryRepr)");
}
Class<?> c = pwp.pointed;
Method[] jms = c.getMethods();
Constructor<?>[] jcs = c.getDeclaredConstructors();
List<Member> msResult = new ArrayList<>(templateWrapper);
Path pTop = Path.outer(0, cs);
for (Member m : l.getMs()) {
if (!(m instanceof MethodWithType)) {
msResult.add(m);
continue;
}
MethodWithType mwt = (MethodWithType) m;
if (mwt.get_inner().isPresent()) {
msResult.add(mwt);
continue;
}
addMwt(p, plgInfo, jms, jcs, msResult, pTop, mwt);
}
return l.withMs(msResult);
}
Aggregations