@Override public void transform(PlasticClass plasticClass) { plasticClass.addToString(String.format("<NoOp %s>", serviceInterface.getName())); } });
@Override public void transform(PlasticClass plasticClass) { plasticClass.addToString(String.format("<NoOp %s>", serviceInterface.getName())); } });
@Override public void transform(PlasticClass plasticClass) { PlasticField commandsField = plasticClass.introduceField(commandsArray.getClass(), "commands").inject( commandsArray); for (Method method : commandInterface.getMethods()) { implementMethod(plasticClass, method, commandsField); } plasticClass.addToString(String.format("<Command chain of %s>", commandInterface.getName())); } });
@Override public void transform(PlasticClass plasticClass) { PlasticField commandsField = plasticClass.introduceField(commandsArray.getClass(), "commands").inject( commandsArray); for (Method method : commandInterface.getMethods()) { implementMethod(plasticClass, method, commandsField); } plasticClass.addToString(String.format("<Command chain of %s>", commandInterface.getName())); } });
public void transform(PlasticClass plasticClass) { this.plasticClass = plasticClass; // Create the various methods; also determine the conduit's property type, property name and identify // the annotation provider. implementNavMethodAndAccessors(); implementOtherMethods(); plasticClass.addToString(String.format("PropertyConduit[%s %s]", rootType.getName(), expression)); }
@Override public void transform(PlasticClass plasticClass) { PlasticField filterField = plasticClass.introduceField(filterInterface, "filter") .injectFromInstanceContext(); PlasticField nextField = plasticClass.introduceField(serviceInterface, "next") .injectFromInstanceContext(); processMethods(plasticClass, filterField, nextField); plasticClass.addToString(String.format("<PipelineBridge from %s to %s>", serviceInterface.getName(), filterInterface.getName())); } });
@Override public void transform(PlasticClass plasticClass) { PlasticField filterField = plasticClass.introduceField(filterInterface, "filter") .injectFromInstanceContext(); PlasticField nextField = plasticClass.introduceField(serviceInterface, "next") .injectFromInstanceContext(); processMethods(plasticClass, filterField, nextField); plasticClass.addToString(String.format("<PipelineBridge from %s to %s>", serviceInterface.getName(), filterInterface.getName())); } });
plasticClass.addToString(String.format("<Strategy for %s>", interfaceType.getName()));
public void transform(PlasticClass plasticClass) { PlasticMethod delegateMethod = plasticClass.introducePrivateMethod( PlasticUtils.toTypeName(serviceType), "delegate", null, null); delegateMethod.addAdvice(new MethodAdvice() { public void advise(MethodInvocation invocation) { invocation.setReturnValue(environment.peekRequired(serviceType)); } }); for (Method method : serviceType.getMethods()) { plasticClass.introduceMethod(method).delegateTo(delegateMethod); } plasticClass.addToString(String.format("<EnvironmentalProxy for %s>", serviceType.getName())); } });
plasticClass.addToString(String.format("<Strategy for %s>", interfaceType.getName()));
public AspectInterceptorBuilderImpl(AnnotationAccess annotationAccess, PlasticProxyFactory plasticProxyFactory, Class<T> serviceInterface, T delegate, String description) { super(annotationAccess); this.serviceInterface = serviceInterface; final Class<? extends Object> delegateType = delegate.getClass(); transformation = plasticProxyFactory.createProxyTransformation(serviceInterface, (Class<? extends T>) delegateType); plasticClass = transformation.getPlasticClass(); plasticClass.addToString(description); allMethods.addAll(Arrays.asList(serviceInterface.getMethods())); final PlasticField delegateField = plasticClass.introduceField(serviceInterface, "delegate").inject(delegate); for (Method method : allMethods) { plasticClass.introduceMethod(method).delegateTo(delegateField); } // TAP5-2235 final String delegateTypeName = delegateType.getName(); MethodDescription getDelegateMethodDescription = new MethodDescription(delegateTypeName, PlasticProxyFactoryImpl.INTERNAL_GET_DELEGATE); plasticClass.introduceMethod(getDelegateMethodDescription, new InstructionBuilderCallback() { @Override public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(delegateField); builder.checkcast(delegateType).returnResult(); } }); }
public AspectInterceptorBuilderImpl(AnnotationAccess annotationAccess, PlasticProxyFactory plasticProxyFactory, Class<T> serviceInterface, T delegate, String description) { super(annotationAccess); this.serviceInterface = serviceInterface; final Class<? extends Object> delegateType = delegate.getClass(); transformation = plasticProxyFactory.createProxyTransformation(serviceInterface, (Class<? extends T>) delegateType); plasticClass = transformation.getPlasticClass(); plasticClass.addToString(description); allMethods.addAll(Arrays.asList(serviceInterface.getMethods())); final PlasticField delegateField = plasticClass.introduceField(serviceInterface, "delegate").inject(delegate); for (Method method : allMethods) { plasticClass.introduceMethod(method).delegateTo(delegateField); } // TAP5-2235 final String delegateTypeName = delegateType.getName(); MethodDescription getDelegateMethodDescription = new MethodDescription(delegateTypeName, PlasticProxyFactoryImpl.INTERNAL_GET_DELEGATE); plasticClass.introduceMethod(getDelegateMethodDescription, new InstructionBuilderCallback() { @Override public void doBuild(InstructionBuilder builder) { builder.loadThis().getField(delegateField); builder.checkcast(delegateType).returnResult(); } }); }
plasticClass.addToString(String.format("<Shadow: property %s of %s>", propertyName, source));
plasticClass.addToString(String.format("<Shadow: property %s of %s>", propertyName, source));
plasticClass.introduceMethod(getDelegateMethodDescription, returnCreateObject); plasticClass.addToString(description);
plasticClass.addToString(description);
plasticClass.addToString(description);