private void pushFieldConduitOntoStack(String conduitFileName, InstructionBuilder builder) { builder.loadThis(); builder.getField(plasticClass.className, conduitFileName, FieldConduit.class); }
private void pushFieldConduitOntoStack(String conduitFileName, InstructionBuilder builder) { builder.loadThis(); builder.getField(plasticClass.className, conduitFileName, FieldConduit.class); }
public void doBuild(InstructionBuilder builder) { invokeNavigateMethod(builder); builder.getField(field.getDeclaringClass().getName(), field.getName(), field.getType()); // Cast not necessary here since the return type of get() is Object boxIfPrimitive(builder, field.getType()); builder.returnResult(); } });
public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(propertyGenericTypeField).returnResult(); } });
public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(propertyTypeField).returnResult(); } });
@Override public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(PlasticFieldImpl.this).returnResult(); } });
@Override public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(PlasticFieldImpl.this).returnResult(); } });
public void doBuild(InstructionBuilder builder) { // Put the delegate on top of the stack builder.loadThis().getField(getDelegateField()); invokeMethod(builder, DelegateMethods.RANGE, rangeNode, 0); builder.returnResult(); } });
public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(resourcesField).returnResult(); } });
void pushInstanceContextFieldOntoStack(InstructionBuilder builder) { builder.loadThis().getField(className, getInstanceContextFieldName(), InstanceContext.class); }
void pushInstanceContextFieldOntoStack(InstructionBuilder builder) { builder.loadThis().getField(className, getInstanceContextFieldName(), InstanceContext.class); }
@Override public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(delegateField); builder.checkcast(delegateType).returnResult(); } });
@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) { builder.loadThis().getField(delegateField); builder.checkcast(delegateType).returnResult(); } });
@Override public void doBuild(InstructionBuilder builder) { // Load the field builder.loadThis().getField(field); builder.loadArguments(); invokeDelegateAndReturnResult(builder, field.getTypeName()); } });
private MethodNode addShimGetAccessMethod() { String name = plasticClass.makeUnique(plasticClass.methodNames, "shim_get_" + node.name); MethodNode mn = new MethodNode(Opcodes.ACC_SYNTHETIC | Opcodes.ACC_FINAL, name, "()" + node.desc, null, null); InstructionBuilder builder = plasticClass.newBuilder(mn); builder.loadThis().getField(plasticClass.className, node.name, typeName).returnResult(); plasticClass.addMethod(mn); plasticClass.fieldTransformMethods.add(mn); return mn; }
private MethodNode addShimGetAccessMethod() { String name = plasticClass.makeUnique(plasticClass.methodNames, "shim_get_" + node.name); MethodNode mn = new MethodNode(Opcodes.ACC_SYNTHETIC | Opcodes.ACC_FINAL, name, "()" + node.desc, null, null); InstructionBuilder builder = plasticClass.newBuilder(mn); builder.loadThis().getField(plasticClass.className, node.name, typeName).returnResult(); plasticClass.addMethod(mn); plasticClass.fieldTransformMethods.add(mn); return mn; }
private void createReturnValueGetter() { InstructionBuilder builder = newMethod("getReturnValue", Object.class); if (isVoid) { builder.loadNull().returnResult(); } else { builder.loadThis().getField(invocationClassName, RETURN_VALUE, description.returnType) .boxPrimitive(description.returnType).returnResult(); } }
private void createReturnValueGetter() { InstructionBuilder builder = newMethod("getReturnValue", Object.class); if (isVoid) { builder.loadNull().returnResult(); } else { builder.loadThis().getField(invocationClassName, RETURN_VALUE, description.returnType) .boxPrimitive(description.returnType).returnResult(); } }
public Class implementNotExpression(InstructionBuilder builder, final Tree notNode) { Type expressionType = implementSubexpression(builder, null, notNode.getChild(0)); boxIfPrimitive(builder, expressionType); // Now invoke the delegate invert() method builder.loadThis().getField(getDelegateField()); builder.swap().invoke(DelegateMethods.INVERT); return boolean.class; }