List of usage examples for org.objectweb.asm Opcodes ASM6
int ASM6
To view the source code for org.objectweb.asm Opcodes ASM6.
Click Source Link
From source file:com.google.gwt.dev.shell.rewrite.ForceClassVersion15.java
License:Apache License
public ForceClassVersion15(ClassVisitor v) { super(Opcodes.ASM6, v); }
From source file:com.google.gwt.dev.shell.rewrite.HasAnnotation.java
License:Apache License
public HasAnnotation(ClassVisitor v, Class<? extends Annotation> annotation) { super(Opcodes.ASM6, v); targetDesc = Type.getDescriptor(annotation); }
From source file:com.google.gwt.dev.shell.rewrite.RewriteJsniMethods.java
License:Apache License
public RewriteJsniMethods(ClassVisitor v, Map<String, String> anonymousClassMap) { super(Opcodes.ASM6, v); this.anonymousClassMap = anonymousClassMap; }
From source file:com.google.gwt.dev.shell.rewrite.RewriteRefsToJsoClasses.java
License:Apache License
/** * Construct a new rewriter instance.//from ww w . j a v a2 s . co m * * @param cv the visitor to chain to * @param jsoDescriptors an unmodifiable set of descriptors containing * <code>JavaScriptObject</code> and all subclasses * @param mapper maps methods to the class in which they are declared */ public RewriteRefsToJsoClasses(ClassVisitor cv, Set<String> jsoDescriptors, InstanceMethodOracle mapper) { super(Opcodes.ASM6, cv); this.jsoDescriptors = jsoDescriptors; this.mapper = mapper; }
From source file:com.google.gwt.dev.shell.rewrite.RewriteSingleJsoImplDispatches.java
License:Apache License
public RewriteSingleJsoImplDispatches(ClassVisitor v, TypeOracle typeOracle, SingleJsoImplData jsoData) { super(Opcodes.ASM6, v); this.typeOracle = typeOracle; this.jsoData = jsoData; }
From source file:com.google.gwt.dev.shell.rewrite.UseMirroredClasses.java
License:Apache License
public UseMirroredClasses(ClassVisitor cv, String className) { super(Opcodes.ASM6, cv); this.className = className; }
From source file:com.google.gwt.dev.shell.rewrite.WriteJsoImpl.java
License:Apache License
/** * Construct a new rewriter instance.//from w w w .j a v a 2 s . c o m * * @param cv the visitor to chain to * @param jsoDescriptors an unmodifiable set of descriptors containing * <code>JavaScriptObject</code> and all subclasses * @param mapper maps methods to the class in which they are declared */ private WriteJsoImpl(ClassVisitor cv, InstanceMethodOracle mapper) { super(Opcodes.ASM6, cv); this.mapper = mapper; }
From source file:com.google.template.soy.jbcsrc.restricted.BytecodeProducer.java
License:Apache License
/** Returns a human readable string for the code that this {@link BytecodeProducer} generates. */ public final String trace() { // TODO(lukes): textifier has support for custom label names by overriding appendLabel. // Consider trying to make use of (using the Label.info field? adding a custom NamedLabel // sub type?) Textifier textifier = new Textifier(Opcodes.ASM6) { {/*w w w. java 2 s. c o m*/ // reset tab sizes. Since we don't care about formatting class names or method // signatures (only code). We only need to set the tab2,tab3 and ltab settings (tab is // for class members). this.tab = null; // trigger an error if used. this.tab2 = " "; // tab setting for instructions this.tab3 = ""; // tab setting for switch cases this.ltab = ""; // tab setting for labels } }; gen(new CodeBuilder(new TraceMethodVisitor(textifier), 0, "trace", "()V")); StringWriter writer = new StringWriter(); textifier.print(new PrintWriter(writer)); return writer.toString(); // Note textifier always adds a trailing newline }
From source file:com.google.template.soy.jbcsrc.restricted.CodeBuilder.java
License:Apache License
public CodeBuilder(MethodVisitor mv, int access, String name, String desc) { super(Opcodes.ASM6, mv); this.adapter = new GeneratorAdapter(mv, access, name, desc); }
From source file:net.fabricmc.loader.transformer.PublicAccessTransformer.java
License:Apache License
@Override public byte[] transform(String name, String transformedName, byte[] bytes) { if (!name.startsWith("net.minecraft") && name.contains(".")) { return bytes; }//from w w w. jav a2 s . co m ClassReader classReader = new ClassReader(bytes); ClassWriter classWriter = new ClassWriter(0); classReader.accept(new AccessClassVisitor(Opcodes.ASM6, classWriter), 0); return classWriter.toByteArray(); }