Commit 43753251 authored by Lionel Seinturier's avatar Lionel Seinturier

Refactor AbstractProxyClassGenerator as a class generator.

parent e8277db3
......@@ -93,9 +93,9 @@ extends AbstractProxyClassGenerator {
}
@Override
public void generateConstructors( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateConstructors( ClassSourceCodeVisitor cv ) {
super.generateConstructors(cv, proxycl);
super.generateConstructors(cv);
// public constructor()
BlockSourceCodeVisitor mv =
......@@ -118,7 +118,7 @@ extends AbstractProxyClassGenerator {
@Override
public void generateProxyMethodBodyBeforeCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
/*
* Regiqter the request context and get the content instance which
......@@ -136,7 +136,7 @@ extends AbstractProxyClassGenerator {
@Override
public void generateProxyMethodBodyAfterCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
// End of the try block
mv.visitln(" }");
......@@ -156,7 +156,7 @@ extends AbstractProxyClassGenerator {
mv.visitln(" }");
}
public String getDelegatingInstance( Class<?> proxycl, Method proxym ) {
public String getDelegatingInstance( Method proxym ) {
return "impl";
}
}
......@@ -103,9 +103,9 @@ extends ServerInterfaceClassGenerator {
}
@Override
public void generateMethods( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateMethods( ClassSourceCodeVisitor cv ) {
super.generateMethods(cv, proxycl);
super.generateMethods(cv);
BlockSourceCodeVisitor mv =
cv.visitMethod(
......@@ -126,7 +126,7 @@ extends ServerInterfaceClassGenerator {
@Override
public void generateProxyMethod(
ClassSourceCodeVisitor cv, Class<?> proxycl, Method proxym ) {
ClassSourceCodeVisitor cv, Method proxym ) {
/*
* Indeed nothing.
* Proxy methods are inherited from the component server interface
......
......@@ -47,13 +47,13 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
}
@Override
public String getDelegatingInstance( Class<?> proxycl, Method proxym ) {
public String getDelegatingInstance( Method proxym ) {
return "impl";
}
@Override
public void generateProxyMethodBodyDelegatingCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
String rtypename = UClass.getGenericReturnType(proxym,proxycl);
......@@ -93,7 +93,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
* @since 1.1.1
*/
@Override
public void generateFieldImpl( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateFieldImpl( ClassSourceCodeVisitor cv ) {
/*
* The implementation of the impl field is inherited from
* TinfiComponentInterceptor.
......@@ -104,7 +104,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
* @since 1.1.1
*/
@Override
public void generateMethodGetFcItfDelegate( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateMethodGetFcItfDelegate( ClassSourceCodeVisitor cv ) {
/*
* The implementation of the getFcItfDelegate method is inherited from
* TinfiComponentInterceptor.
......@@ -115,7 +115,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
* @since 1.1.1
*/
@Override
public void generateMethodSetFcItfDelegate( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateMethodSetFcItfDelegate( ClassSourceCodeVisitor cv ) {
/*
* The implementation of the setFcItfDelegate method is inherited from
* TinfiComponentInterceptor.
......
......@@ -93,7 +93,7 @@ extends AbstractInterceptorSourceCodeGenerator {
@Override
public void generateProxyMethodBodyBeforeCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
/*
* Regiqter the request context and get the content instance which
......@@ -118,7 +118,7 @@ extends AbstractInterceptorSourceCodeGenerator {
@Override
public void generateProxyMethodBodyFinallyCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
// End of the try block
mv.visitln(" }");
......
......@@ -88,7 +88,7 @@ extends AbstractInterceptorSourceCodeGenerator {
}
@Override
public void generateStaticParts( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateStaticParts( ClassSourceCodeVisitor cv ) {
/*
* Initialize the METHODS field (declared below in method
......@@ -137,7 +137,7 @@ extends AbstractInterceptorSourceCodeGenerator {
}
@Override
public void generateFields( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateFields( ClassSourceCodeVisitor cv ) {
/*
* Generate a METHODS field to store the array of component methods
......@@ -254,18 +254,18 @@ extends AbstractInterceptorSourceCodeGenerator {
}
@Override
public void generateMethodInitFcController( BlockSourceCodeVisitor mv, Class<?> proxycl ) {
public void generateMethodInitFcController( BlockSourceCodeVisitor mv ) {
mv.visitln(" initIntentHandlersMap(METHODS);");
}
@Override
public void generateMethodClone( BlockSourceCodeVisitor mv, Class<?> proxycl ) {
public void generateMethodClone( BlockSourceCodeVisitor mv ) {
mv.visitln(" clone.initIntentHandlersMap(METHODS);");
}
@Override
public void generateProxyMethodBodyBeforeCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
/*
* Retrieve the index of proxym in the array of methods for proxycl.
......@@ -382,7 +382,7 @@ extends AbstractInterceptorSourceCodeGenerator {
@Override
public void generateProxyMethodBodyFinallyCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
// End of else block
mv.visitln(" }");
......
......@@ -99,12 +99,12 @@ extends AbstractInterceptorSourceCodeGenerator {
}
@Override
public void generateMethodInitFcController( BlockSourceCodeVisitor mv, Class<?> proxycl ) {
public void generateMethodInitFcController( BlockSourceCodeVisitor mv ) {
mv.visitIns("super.initFcController(ic)");
}
@Override
public void generateMethodClone( BlockSourceCodeVisitor mv, Class<?> proxycl ) {
public void generateMethodClone( BlockSourceCodeVisitor mv ) {
mv.visitIns("initFcClone(clone)");
}
}
......@@ -80,7 +80,7 @@ extends InterfaceImplementationClassGenerator {
}
@Override
public void generateFieldImpl( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateFieldImpl( ClassSourceCodeVisitor cv ) {
/*
* Indeed nothing.
* The field is managed by TinfiComponentInterface.
......@@ -88,7 +88,7 @@ extends InterfaceImplementationClassGenerator {
}
@Override
public void generateMethodGetFcItfImpl( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateMethodGetFcItfImpl( ClassSourceCodeVisitor cv ) {
/*
* Indeed nothing.
* The method is inherited from TinfiComponentInterface.
......@@ -96,7 +96,7 @@ extends InterfaceImplementationClassGenerator {
}
@Override
public void generateMethodSetFcItfImpl( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateMethodSetFcItfImpl( ClassSourceCodeVisitor cv ) {
/*
* Indeed nothing.
* The method is inherited from TinfiComponentInterface.
......
......@@ -130,10 +130,9 @@ extends AbstractProxyClassGenerator {
}
@Override
public void generateConstructors(
ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateConstructors( ClassSourceCodeVisitor cv ) {
super.generateConstructors(cv,proxycl);
super.generateConstructors(cv);
/*
* Create the signature of the proxy interface with generic parameters
......@@ -161,7 +160,7 @@ extends AbstractProxyClassGenerator {
* @since 1.4.1
*/
@Override
public void generateMethods( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateMethods( ClassSourceCodeVisitor cv ) {
/*
* Override the getService method inherited from ServiceReferenceImpl.
* The idea is that in generated subclasses of ServiceReferenceImpl we
......@@ -181,9 +180,9 @@ extends AbstractProxyClassGenerator {
@Override
public void generateProxyMethodBodyBeforeCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
super.generateProxyMethodBodyBeforeCode(mv,proxycl,proxym);
super.generateProxyMethodBodyBeforeCode(mv,proxym);
conversationalItf = proxycl.getAnnotation(Conversational.class);
oneWayMeth =
......@@ -259,9 +258,9 @@ extends AbstractProxyClassGenerator {
@Override
public void generateProxyMethodBodyAfterCode(
BlockSourceCodeVisitor mv, Class<?> proxycl, Method proxym ) {
BlockSourceCodeVisitor mv, Method proxym ) {
super.generateProxyMethodBodyAfterCode(mv,proxycl,proxym);
super.generateProxyMethodBodyAfterCode(mv,proxym);
EndsConversation end = proxym.getAnnotation(EndsConversation.class);
if( end != null ) {
......@@ -289,7 +288,7 @@ extends AbstractProxyClassGenerator {
}
}
public String getDelegatingInstance( Class<?> proxycl, Method proxym ) {
public String getDelegatingInstance( Method proxym ) {
return "service";
}
}
......@@ -41,7 +41,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
public InterceptorNoIntentClassGenerator() {}
@Override
public void generateFieldImpl( ClassSourceCodeVisitor cv, Class<?> proxycl ) {
public void generateFieldImpl( ClassSourceCodeVisitor cv ) {
/*
* The implementation of the impl field is inherited from
* TinfiComponentInterceptor.
......@@ -49,7 +49,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
}
@Override
public void generateMethodGetFcItfDelegate(ClassSourceCodeVisitor cv, Class<?> proxycl) {
public void generateMethodGetFcItfDelegate( ClassSourceCodeVisitor cv ) {
/*
* The implementation of the getFcItfDelegate method is inherited from
* TinfiComponentInterceptor.
......@@ -57,7 +57,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
}
@Override
public void generateMethodSetFcItfDelegate(ClassSourceCodeVisitor cv, Class<?> proxycl) {
public void generateMethodSetFcItfDelegate( ClassSourceCodeVisitor cv ) {
/*
* The implementation of the setFcItfDelegate method is inherited from
* TinfiComponentInterceptor.
......@@ -65,7 +65,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
}
@Override
public String getDelegatingInstance( Class<?> proxycl, Method proxym ) {
public String getDelegatingInstance( Method proxym ) {
return "impl";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment