List of usage examples for org.objectweb.asm Opcodes ASM5
int ASM5
To view the source code for org.objectweb.asm Opcodes ASM5.
Click Source Link
From source file:io.leangen.graphql.util.classpath.ClassInfo.java
License:BSD License
/** * Create a <tt>ClassInfo</tt> object from a file. * * @param classFile the abstract path to the class file to load * @throws ClassReadingException load error *///from w w w .j av a2 s . c o m public ClassInfo(File classFile) throws ClassReadingException { super(Opcodes.ASM5); try { ClassReader cr = new ClassReader(new FileInputStream(classFile)); cr.accept(this, ASM_CR_ACCEPT_CRITERIA); } catch (IOException ex) { throw new ClassReadingException("Unable to load class file \"{0}\"", ex); } }
From source file:io.leangen.graphql.util.classpath.ClassInfo.java
License:BSD License
/** * Create a <tt>ClassInfo</tt> object from an <tt>InputStream</tt>. * * @param is the open <tt>InputStream</tt> containing the class bytes * @throws ClassReadingException load error *///from w ww .j a v a 2s . c om public ClassInfo(InputStream is) throws ClassReadingException { super(Opcodes.ASM5); try { ClassReader cr = new ClassReader(is); cr.accept(this, ASM_CR_ACCEPT_CRITERIA); } catch (IOException ex) { throw new ClassReadingException("Unable to load class from open input stream", ex); } }
From source file:io.leangen.graphql.util.classpath.ClassInfo.java
License:BSD License
/** * Create a new <tt>ClassInfo</tt> object. * * @param name the class name//from w w w . j a v a 2 s. c om * @param superClassName the parent class name, or null * @param interfaces the names of interfaces the class implements, * or null * @param asmAccessMask ASM API's access mask for the class * @param location File (jar, zip) or directory where class was found */ ClassInfo(String name, String superClassName, String[] interfaces, int asmAccessMask, File location) { super(Opcodes.ASM5); setClassFields(name, superClassName, interfaces, asmAccessMask, location); }
From source file:io.leangen.graphql.util.classpath.ClassInfoClassVisitor.java
License:BSD License
/** * Constructor/*from w w w. jav a 2s. c o m*/ * * @param foundClasses where to store the class information. The * {@link ClassInfo} records are stored in the map, * indexed by class name. * @param location file (jar, zip) or directory containing classes * being processed by this visitor */ ClassInfoClassVisitor(Map<String, ClassInfo> foundClasses, File location) { super(Opcodes.ASM5); this.foundClasses = foundClasses; this.location = location; }
From source file:io.machinecode.chainlink.tck.core.FieldInstrument.java
License:Open Source License
private static ClassVisitor instrumentConstant(final String constant, final String value, final ClassWriter writer) throws IOException { return new ClassVisitor(Opcodes.ASM5, writer) { @Override//from w ww . j a va2 s.com public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { return new MethodVisitor(Opcodes.ASM5, super.visitMethod(access, name, desc, signature, exceptions)) { @Override public void visitLdcInsn(final Object cst) { if (constant.equals(cst)) { super.visitLdcInsn(value); } else { super.visitLdcInsn(cst); } } }; } }; }
From source file:io.syncframework.optimizer.OControllerClassVisitor.java
License:Apache License
public OControllerClassVisitor(ClassVisitor cv, OControllerReflector reflector) { super(Opcodes.ASM5, cv); this.reflector = reflector; }
From source file:io.syncframework.optimizer.OControllerStaticMethodVisitor.java
License:Apache License
public OControllerStaticMethodVisitor(MethodVisitor mv, OControllerReflector reflector) { super(Opcodes.ASM5, mv); this.reflector = reflector; }
From source file:io.syncframework.optimizer.OInitializerClassVisitor.java
License:Apache License
public OInitializerClassVisitor(ClassVisitor cv, OInitializerReflector reflector) { super(Opcodes.ASM5, cv); this.reflector = reflector; }
From source file:io.syncframework.optimizer.OInterceptorClassVisitor.java
License:Apache License
public OInterceptorClassVisitor(ClassVisitor cv, OInterceptorReflector reflector) { super(Opcodes.ASM5, cv); this.reflector = reflector; }
From source file:io.syncframework.optimizer.OInterceptorStaticMethodVisitor.java
License:Apache License
public OInterceptorStaticMethodVisitor(MethodVisitor mv, OInterceptorReflector reflector) { super(Opcodes.ASM5, mv); this.reflector = reflector; }