use of org.apache.bcel.classfile.DescendingVisitor in project jop by jop-devel.
the class OldAppInfo method iterate.
/**
* Iterate over all classes and run the visitor.
*
* @param v
*/
public void iterate(Visitor v) {
Iterator<? extends OldClassInfo> it = cliMap.values().iterator();
while (it.hasNext()) {
JavaClass clz = it.next().clazz;
new DescendingVisitor(clz, v).visit();
}
}
use of org.apache.bcel.classfile.DescendingVisitor in project jop by jop-devel.
the class OldClassInfo method genClassInfoMap.
/**
* Create ClassInfos and the map from class names to ClassInfo
* @param jc
* @return
*/
Map<String, ? extends OldClassInfo> genClassInfoMap(JavaClass[] jc, OldAppInfo ai) {
Map<String, OldClassInfo> map = new HashMap<String, OldClassInfo>();
for (int i = 0; i < jc.length; ++i) {
OldClassInfo cli = newClassInfo(jc[i], ai);
map.put(cli.clazz.getClassName(), cli);
}
// second iteration over all class infos for additional information setting
CliVisitor v = newCliVisitor(map);
Iterator<? extends OldClassInfo> it = map.values().iterator();
while (it.hasNext()) {
JavaClass clz = it.next().clazz;
new DescendingVisitor(clz, v).visit();
}
return map;
}
Aggregations