use of org.hotswap.agent.javassist.bytecode.MethodInfo in project HotswapAgent by HotswapProjects.
the class FieldInitLink method makeBehaviorCache.
private void makeBehaviorCache(CtMember.Cache cache) {
List list = getClassFile3(false).getMethods();
int n = list.size();
for (int i = 0; i < n; ++i) {
MethodInfo minfo = (MethodInfo) list.get(i);
if (minfo.isMethod()) {
CtMethod newMethod = new CtMethod(minfo, this);
cache.addMethod(newMethod);
} else {
CtConstructor newCons = new CtConstructor(minfo, this);
cache.addConstructor(newCons);
}
}
}
use of org.hotswap.agent.javassist.bytecode.MethodInfo in project HotswapAgent by HotswapProjects.
the class FieldInitLink method removeConstructor.
public void removeConstructor(CtConstructor m) throws NotFoundException {
checkModify();
MethodInfo mi = m.getMethodInfo2();
ClassFile cf = getClassFile2();
if (cf.getMethods().remove(mi)) {
getMembers().remove(m);
gcConstPool = true;
} else
throw new NotFoundException(m.toString());
}
Aggregations