use of org.objectweb.asm.ClassReader in project spring-loaded by spring-projects.
the class SpringLoadedTests method print.
protected void print(byte[] classdata) {
ClassReader reader = new ClassReader(classdata);
reader.accept(new ClassPrinter(System.out), 0);
}
use of org.objectweb.asm.ClassReader in project bazel by bazelbuild.
the class JavacTurbine method processBytecode.
/**
* Remove code attributes and private members.
*
* <p>Most code will already have been removed after parsing, but the bytecode will still contain
* e.g. lowered class and instance initializers.
*/
private static byte[] processBytecode(byte[] bytes) {
ClassWriter cw = new ClassWriter(0);
new ClassReader(bytes).accept(new PrivateMemberPruner(cw), ClassReader.SKIP_CODE | ClassReader.SKIP_FRAMES | ClassReader.SKIP_DEBUG);
return cw.toByteArray();
}
use of org.objectweb.asm.ClassReader in project auto by google.
the class AbstractMethodLister method abstractNoArgMethodsX.
private ImmutableList<String> abstractNoArgMethodsX() throws IOException {
ClassReader classReader = new ClassReader(inputStream);
RecordingClassVisitor classVisitor = new RecordingClassVisitor();
classReader.accept(classVisitor, 0);
return classVisitor.abstractNoArgMethods.build();
}
use of org.objectweb.asm.ClassReader in project spring-loaded by spring-projects.
the class TypeRewriter method rewrite.
public static byte[] rewrite(ReloadableType rtype, byte[] bytes) {
ClassReader fileReader = new ClassReader(bytes);
RewriteClassAdaptor classAdaptor = new RewriteClassAdaptor(rtype);
fileReader.accept(classAdaptor, 0);
return classAdaptor.getBytes();
}
use of org.objectweb.asm.ClassReader in project spring-loaded by spring-projects.
the class InterfaceExtractor method extract.
public byte[] extract(byte[] classbytes, TypeDescriptor typeDescriptor) {
ClassReader fileReader = new ClassReader(classbytes);
ExtractorVisitor extractorVisitor = new ExtractorVisitor(typeDescriptor);
fileReader.accept(extractorVisitor, 0);
return extractorVisitor.getBytes();
}
Aggregations