205206207208209210211212213214215
// Method _service() will look up the service implementation, // then update the deferred proxy to go directly to the // service implementation, bypassing itself! body.clear(); body.begin(); body.add("if (_service == null)"); body.begin();
232233234235236237238239240241242
builder.addServiceMethods("_service()"); // Build the implementation of interface SingletonInnerProxy body.clear(); body.begin(); body.add("_service();"); body.end();
152153154155156157158159160161162
builder.addln("{0} = {1}.createBinding(this);", bindingField, creatorField); op.extendMethodImplementation(IComponent.class, EnhanceUtils.FINISH_LOAD_SIGNATURE, builder .toString()); builder.clear(); builder.addln("{0} = {1};", fieldName, EnhanceUtils.createUnwrapExpression( op, bindingField, propertyType));
8182838485868788899091
op.addMethod(Modifier.PUBLIC, sig, builder.toString(), location); // Mutator builder.clear(); builder.begin(); builder.addln("{0}.store(\"{1}\", $1);", managerField, objectName); builder.addln("{0} = $1;", fieldName); builder.end();
151152153154155156157158159160161
7778798081828384858687
op.addMethod(Modifier.PUBLIC, sig, builder.toString()); // Mutator builder.clear(); builder.begin(); builder.addln("{0}.store(\"{1}\", $1);", managerField, objectName); builder.addln("{0} = $1;", fieldName); builder.end();
op.addMethod( Modifier.PUBLIC, new MethodSignature(String.class, "getFred", null, null), builder.toString()); builder.clear(); builder.begin(); builder.addln("if (! isInActiveState())"); builder.begin(); builder.addln("_$fred$Default = $1;");
251252253254255256257258259260261
239240241242243244245246247248249
212213214215216217218219220221222