* the two methods call each other are added.
*/
private void addBridgeMethod(PlasticClass plasticClass, PlasticField filterField, PlasticField nextField,
final MethodSignature ms, List filterMethods)
{
PlasticMethod method = plasticClass.introduceMethod(ms.getMethod());
Iterator i = filterMethods.iterator();
while (i.hasNext())
{
MethodSignature fms = (MethodSignature) i.next();
int position = filterMethodAnalyzer.findServiceInterfacePosition(ms, fms);
if (position >= 0)
{
bridgeServiceMethodToFilterMethod(method, filterField, nextField, position, ms, fms);
i.remove();
return;
}
}
method.changeImplementation(new InstructionBuilderCallback()
{
public void doBuild(InstructionBuilder builder)
{
String message = String.format("Method %s has no match in filter interface %s.", ms, filterInterface.getName());