public void load_this() { if (TypeUtils.isStatic(state.access)) { throw new IllegalStateException("no 'this' pointer within static method"); } mv.visitVarInsn(Constants.ALOAD, 0); }
public void load_this() { if (TypeUtils.isStatic(state.access)) { throw new IllegalStateException("no 'this' pointer within static method"); } mv.visitVarInsn(Constants.ALOAD, 0); }
State(ClassInfo classInfo, int access, Signature sig, Type[] exceptionTypes) { this.classInfo = classInfo; this.access = access; this.sig = sig; this.exceptionTypes = exceptionTypes; localOffset = TypeUtils.isStatic(access) ? 0 : 1; argumentTypes = sig.getArgumentTypes(); }
public void declare_field(int access, String name, Type type, Object value) { super.declare_field(access, name, type, value); if (!TypeUtils.isStatic(access)) { fields.put(name, type); } }
State(ClassInfo classInfo, int access, Signature sig, Type[] exceptionTypes) { this.classInfo = classInfo; this.access = access; this.sig = sig; this.exceptionTypes = exceptionTypes; localOffset = TypeUtils.isStatic(access) ? 0 : 1; argumentTypes = sig.getArgumentTypes(); }
public void declare_field(int access, String name, Type type, Object value) { super.declare_field(access, name, type, value); if (!TypeUtils.isStatic(access)) { fields.put(name, type); } }
public void putfield(String name) { ClassEmitter.FieldInfo info = ce.getFieldInfo(name); int opcode = TypeUtils.isStatic(info.access) ? Constants.PUTSTATIC : Constants.PUTFIELD; emit_field(opcode, ce.getClassType(), name, info.type); }
public void getfield(String name) { ClassEmitter.FieldInfo info = ce.getFieldInfo(name); int opcode = TypeUtils.isStatic(info.access) ? Constants.GETSTATIC : Constants.GETFIELD; emit_field(opcode, ce.getClassType(), name, info.type); }
public void putfield(String name) { ClassEmitter.FieldInfo info = ce.getFieldInfo(name); int opcode = TypeUtils.isStatic(info.access) ? Constants.PUTSTATIC : Constants.PUTFIELD; emit_field(opcode, ce.getClassType(), name, info.type); }
public void getfield(String name) { ClassEmitter.FieldInfo info = ce.getFieldInfo(name); int opcode = TypeUtils.isStatic(info.access) ? Constants.GETSTATIC : Constants.GETFIELD; emit_field(opcode, ce.getClassType(), name, info.type); }
public AddStaticInitTransformer(Method classInit) { info = ReflectUtils.getMethodInfo(classInit); if (!TypeUtils.isStatic(info.getModifiers())) { throw new IllegalArgumentException(classInit + " is not static"); } Type[] types = info.getSignature().getArgumentTypes(); if (types.length != 1 || !types[0].equals(Constants.TYPE_CLASS) || !info.getSignature().getReturnType().equals(Type.VOID_TYPE)) { throw new IllegalArgumentException(classInit + " illegal signature"); } }
public AddStaticInitTransformer(Method classInit) { info = ReflectUtils.getMethodInfo(classInit); if (!TypeUtils.isStatic(info.getModifiers())) { throw new IllegalArgumentException(classInit + " is not static"); } Type[] types = info.getSignature().getArgumentTypes(); if (types.length != 1 || !types[0].equals(Constants.TYPE_CLASS) || !info.getSignature().getReturnType().equals(Type.VOID_TYPE)) { throw new IllegalArgumentException(classInit + " illegal signature"); } }
public void declare_field(int access, String name, Type type, Object value) { super.declare_field(access, name, type, value); if (!TypeUtils.isStatic(access)) { if (filter.acceptRead(getClassType(), name)) { addReadMethod(name, type); } if (filter.acceptWrite(getClassType(), name)) { addWriteMethod(name, type); } } }
public void declare_field(int access, String name, Type type, Object value) { super.declare_field(access, name, type, value); if (!TypeUtils.isStatic(access)) { if (filter.acceptRead(getClassType(), name)) { addReadMethod(name, type); } if (filter.acceptWrite(getClassType(), name)) { addWriteMethod(name, type); } } }
public void invoke(MethodInfo method, Type virtualType) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInterface(classInfo.getModifiers())) { invoke_interface(type, sig); } else if (TypeUtils.isStatic(method.getModifiers())) { invoke_static(type, sig); } else { invoke_virtual(virtualType, sig); } }
public void invoke(MethodInfo method, Type virtualType) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInterface(classInfo.getModifiers())) { invoke_interface(type, sig); } else if (TypeUtils.isStatic(method.getModifiers())) { invoke_static(type, sig); } else { invoke_virtual(virtualType, sig); } }
boolean isStatic = TypeUtils.isStatic(methodInfo.getModifiers()); if ((target == null) ^ isStatic) { throw new IllegalArgumentException("Static method " + (isStatic ? "not " : "") + "expected");
boolean isStatic = TypeUtils.isStatic(methodInfo.getModifiers()); if ((target == null) ^ isStatic) { throw new IllegalArgumentException("Static method " + (isStatic ? "not " : "") + "expected");
public void load_this() { if (TypeUtils.isStatic(state.access)) { throw new IllegalStateException("no 'this' pointer within static method"); } mv.visitVarInsn(Constants.ALOAD, 0); }
public AddStaticInitTransformer(Method classInit) { info = ReflectUtils.getMethodInfo(classInit); if (!TypeUtils.isStatic(info.getModifiers())) { throw new IllegalArgumentException(classInit + " is not static"); } Type[] types = info.getSignature().getArgumentTypes(); if (types.length != 1 || !types[0].equals(Constants.TYPE_CLASS) || !info.getSignature().getReturnType().equals(Type.VOID_TYPE)) { throw new IllegalArgumentException(classInit + " illegal signature"); } }