List of usage examples for org.objectweb.asm Opcodes ASM4
int ASM4
To view the source code for org.objectweb.asm Opcodes ASM4.
Click Source Link
From source file:com.googlecode.gwt.test.internal.rewrite.RewriteSingleJsoImplDispatches.java
License:Apache License
public RewriteSingleJsoImplDispatches(ClassVisitor v, TypeOracle typeOracle, SingleJsoImplData jsoData) { super(Opcodes.ASM4, v); this.typeOracle = typeOracle; this.jsoData = jsoData; }
From source file:com.googlecode.gwt.test.internal.rewrite.UseMirroredClasses.java
License:Apache License
public UseMirroredClasses(ClassVisitor cv, String className) { super(Opcodes.ASM4, cv); this.className = className; }
From source file:com.googlecode.gwt.test.internal.rewrite.WriteJsoImpl.java
License:Apache License
/** * Construct a new rewriter instance.// w w w .j a va 2s . c om * * @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.ASM4, cv); this.mapper = mapper; }
From source file:com.googlecode.japi.checker.AnnotationDumper.java
License:Apache License
public AnnotationDumper(JavaItem owner, String desc, boolean visible) { super(Opcodes.ASM4); logger.fine(" (annotation) " + desc + " " + visible); this.annotation = new AnnotationData(desc, visible); owner.add(annotation);// w ww.java 2 s .co m }
From source file:com.googlecode.japi.checker.ClassDumper.java
License:Apache License
/** * Create a new visitor instance./*from www . j av a 2 s . c o m*/ * @param loader the ClassDataLoader to which the model are associated. */ public ClassDumper(ClassDataLoader loader) { super(Opcodes.ASM4); this.loader = loader; }
From source file:com.googlecode.japi.checker.MethodDumper.java
License:Apache License
public MethodDumper(MethodData method) { super(Opcodes.ASM4); this.method = method; }
From source file:com.hea3ven.hardmodetweaks.core.ClassTransformerHardModeTweaks.java
License:Open Source License
private MethodNode createNewGetWorldTimeMethod(String methodName, boolean obfuscated) { // > long getWorldTime() { // > return TimeTweaksManager.getWorldTime(this); // > }/*w w w . j a va2s . c om*/ MethodNode getWorldTimeMethod = new MethodNode(Opcodes.ASM4, Opcodes.ACC_PUBLIC, methodName, "()J", null, null); getWorldTimeMethod.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0)); getWorldTimeMethod.instructions .add(new MethodInsnNode(Opcodes.INVOKESTATIC, "com/hea3ven/hardmodetweaks/TimeTweaksManager", "getWorldTime", "(L" + WORLD_INFO.getPath(obfuscated) + ";)J")); getWorldTimeMethod.instructions.add(new InsnNode(Opcodes.LRETURN)); return getWorldTimeMethod; }
From source file:com.hea3ven.hardmodetweaks.core.ClassTransformerHardModeTweaks.java
License:Open Source License
private MethodNode createNewSetWorldTimeMethod(String methodName, boolean obfuscated) { // > void setWorldTime(long time) { // > TimeTweaksManager.setWorldTime(this, time); // > }// w w w . ja v a 2 s. com MethodNode setWorldTimeMethod = new MethodNode(Opcodes.ASM4, Opcodes.ACC_PUBLIC, methodName, "(J)V", null, null); setWorldTimeMethod.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0)); setWorldTimeMethod.instructions.add(new VarInsnNode(Opcodes.LLOAD, 1)); setWorldTimeMethod.instructions .add(new MethodInsnNode(Opcodes.INVOKESTATIC, "com/hea3ven/hardmodetweaks/TimeTweaksManager", "setWorldTime", "(L" + WORLD_INFO.getPath(obfuscated) + ";J)V")); setWorldTimeMethod.instructions.add(new InsnNode(Opcodes.RETURN)); return setWorldTimeMethod; }
From source file:com.hea3ven.hardmodetweaks.core.ClassTransformerHardModeTweaks.java
License:Open Source License
private MethodNode createNewCalcCelAngleMethod(String methodName, boolean obfuscated) { // > float calculateCelestialAngle(long time, float off) { // > return TimeTweaksManager.calculateCelestialAngle(time, off); // > }//from w ww . j a va2 s . c om MethodNode getWorldTimeMethod = new MethodNode(Opcodes.ASM4, Opcodes.ACC_PUBLIC, methodName, "(JF)F", null, null); getWorldTimeMethod.instructions.add(new VarInsnNode(Opcodes.LLOAD, 1)); getWorldTimeMethod.instructions.add(new VarInsnNode(Opcodes.FLOAD, 3)); getWorldTimeMethod.instructions.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "com/hea3ven/hardmodetweaks/TimeTweaksManager", "calculateCelestialAngle", "(JF)F")); getWorldTimeMethod.instructions.add(new InsnNode(Opcodes.FRETURN)); return getWorldTimeMethod; }
From source file:com.heliosapm.ClassIntrumentor.java
License:Open Source License
/** * Creates a new ClassIntrumentor/* ww w .ja va2 s . c om*/ * @param cw The class writer * @param targetMethods A map of target method name || descriptors keyed by the method */ public ClassIntrumentor(final ClassWriter cw, Map<String, String[]> targetMethods) { super(Opcodes.ASM4, cw); this.targetMethods = targetMethods; }