@Override public void doBuild(InstructionBuilder builder) { // Load the field builder.loadThis(); if (Modifier.isPrivate(providerDescriptor.modifiers)) { builder.invokeSpecial(plasticClass.className, providerDescriptor); } else { builder.invokeVirtual(plasticClass.className, delegateType, providerDescriptor.methodName); } builder.loadArguments(); invokeDelegateAndReturnResult(builder, delegateType); } });
@Override public void doBuild(InstructionBuilder builder) { // Load the field builder.loadThis(); if (Modifier.isPrivate(providerDescriptor.modifiers)) { builder.invokeSpecial(plasticClass.className, providerDescriptor); } else { builder.invokeVirtual(plasticClass.className, delegateType, providerDescriptor.methodName); } builder.loadArguments(); invokeDelegateAndReturnResult(builder, delegateType); } });
@Override public void doBuild(InstructionBuilder builder) { // Load the field builder.loadThis().getField(field); builder.loadArguments(); invokeDelegateAndReturnResult(builder, field.getTypeName()); } });
@Override public void doBuild(InstructionBuilder builder) { // Load the field builder.loadThis().getField(field); builder.loadArguments(); invokeDelegateAndReturnResult(builder, field.getTypeName()); } });
private void addSuperCall(InstructionBuilder builder) { builder.loadThis().loadArguments().invokeSpecial(plasticClass.getSuperClassName(), interfaceMethodDescription); }
private void createOverrideOfBaseClassImpl(MethodDescription methodDescription, MethodNode methodNode) { InstructionBuilder builder = newBuilder(methodDescription, methodNode); builder.loadThis(); builder.loadArguments(); builder.invokeSpecial(superClassName, methodDescription); builder.returnResult(); }
private void createOverrideOfBaseClassImpl(MethodDescription methodDescription, MethodNode methodNode) { InstructionBuilder builder = newBuilder(methodDescription, methodNode); builder.loadThis(); builder.loadArguments(); builder.invokeSpecial(superClassName, methodDescription); builder.returnResult(); }
private String createAccessMethod() { String name = String.format("%s$access%s", node.name, PlasticUtils.nextUID()); // Kind of awkward that exceptions are specified as String[] when what we have handy is List<String> MethodNode mn = new MethodNode(Opcodes.ACC_SYNTHETIC | Opcodes.ACC_FINAL, name, node.desc, node.signature, null); // But it is safe enough for the two nodes to share mn.exceptions = node.exceptions; InstructionBuilder builder = plasticClass.newBuilder(mn); builder.loadThis(); builder.loadArguments(); builder.invokeSpecial(plasticClass.className, description); builder.returnResult(); plasticClass.addMethod(mn); return name; }
private String createAccessMethod() { String name = String.format("%s$access%s", node.name, PlasticUtils.nextUID()); // Kind of awkward that exceptions are specified as String[] when what we have handy is List<String> MethodNode mn = new MethodNode(Opcodes.ACC_SYNTHETIC | Opcodes.ACC_FINAL, name, node.desc, node.signature, null); // But it is safe enough for the two nodes to share mn.exceptions = node.exceptions; InstructionBuilder builder = plasticClass.newBuilder(mn); builder.loadThis(); builder.loadArguments(); builder.invokeSpecial(plasticClass.className, description); builder.returnResult(); plasticClass.addMethod(mn); return name; }
builder.loadArguments(); builder.invokeConstructor(invocationClassName, constructorTypes);
builder.loadArguments(); builder.invokeConstructor(invocationClassName, constructorTypes);