use of jodd.proxetta.asm.TargetClassInfoReader in project jodd by oblac.
the class ProxettaBuilder method process.
/**
* Reads the target and creates destination class.
*/
protected void process() {
if (targetInputStream == null) {
throw new ProxettaException("Target missing");
}
// create class reader
ClassReader classReader;
try {
classReader = new ClassReader(targetInputStream);
} catch (IOException ioex) {
throw new ProxettaException("Error reading class input stream", ioex);
}
// reads information
TargetClassInfoReader targetClassInfoReader = new TargetClassInfoReader(proxetta.getClassLoader());
classReader.accept(targetClassInfoReader, 0);
this.destClassWriter = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);
// create proxy
if (log.isDebugEnabled()) {
log.debug("processing: " + classReader.getClassName());
}
WorkData wd = process(classReader, targetClassInfoReader);
// store important data
proxyApplied = wd.proxyApplied;
proxyClassName = wd.thisReference.replace('/', '.');
}
Aggregations