Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frascati
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
114
Issues
114
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frascati
frascati
Commits
43753251
Commit
43753251
authored
Jan 22, 2017
by
Lionel Seinturier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor AbstractProxyClassGenerator as a class generator.
parent
e8277db3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
39 deletions
+38
-39
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/CallBackInterfaceClassGenerator.java
...rascati/tinfi/opt/oo/CallBackInterfaceClassGenerator.java
+5
-5
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/ClientInterfaceClassGenerator.java
.../frascati/tinfi/opt/oo/ClientInterfaceClassGenerator.java
+3
-3
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/InterceptorClassGenerator.java
.../ow2/frascati/tinfi/opt/oo/InterceptorClassGenerator.java
+5
-5
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/SCAContentInterceptorSourceCodeGenerator.java
...infi/opt/oo/SCAContentInterceptorSourceCodeGenerator.java
+2
-2
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/SCAIntentInterceptorSourceCodeGenerator.java
...tinfi/opt/oo/SCAIntentInterceptorSourceCodeGenerator.java
+6
-6
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/SCATinfiInterceptorSourceCodeGenerator.java
.../tinfi/opt/oo/SCATinfiInterceptorSourceCodeGenerator.java
+2
-2
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/ServerInterfaceClassGenerator.java
.../frascati/tinfi/opt/oo/ServerInterfaceClassGenerator.java
+3
-3
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/ServiceReferenceClassGenerator.java
...frascati/tinfi/opt/oo/ServiceReferenceClassGenerator.java
+8
-9
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/light/InterceptorNoIntentClassGenerator.java
...tinfi/opt/oo/light/InterceptorNoIntentClassGenerator.java
+4
-4
No files found.
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/CallBackInterfaceClassGenerator.java
View file @
43753251
...
...
@@ -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"
;
}
}
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/ClientInterfaceClassGenerator.java
View file @
43753251
...
...
@@ -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
...
...
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/InterceptorClassGenerator.java
View file @
43753251
...
...
@@ -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.
...
...
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/SCAContentInterceptorSourceCodeGenerator.java
View file @
43753251
...
...
@@ -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
(
" }"
);
...
...
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/SCAIntentInterceptorSourceCodeGenerator.java
View file @
43753251
...
...
@@ -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
(
" }"
);
...
...
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/SCATinfiInterceptorSourceCodeGenerator.java
View file @
43753251
...
...
@@ -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)"
);
}
}
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/ServerInterfaceClassGenerator.java
View file @
43753251
...
...
@@ -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.
...
...
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/ServiceReferenceClassGenerator.java
View file @
43753251
...
...
@@ -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
,
proxy
cl
,
proxy
m
);
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
,
proxy
cl
,
proxy
m
);
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"
;
}
}
tinfi/module/opt-oo/core/src/main/java/org/ow2/frascati/tinfi/opt/oo/light/InterceptorNoIntentClassGenerator.java
View file @
43753251
...
...
@@ -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"
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment