Commit 134252e1 authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Remove ClassGeneratorItf that has been replaced by TypeGeneratorItf.

parent ec2ae702
......@@ -70,8 +70,8 @@ import org.objectweb.fractal.julia.type.BasicComponentType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.api.ADLParserSupportItf;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.FCSourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.desc.AttributeDesc;
import org.objectweb.fractal.juliac.desc.BindingDesc;
......@@ -189,7 +189,7 @@ public class EMFParserSupportImpl implements ADLParserSupportItf {
public void generate( ComponentDesc cdesc, String targetname )
throws IOException {
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new ComponentDescFactoryClassGenerator(jc,cdesc,targetname);
jc.generateSourceCode(cg);
}
......
......@@ -30,9 +30,9 @@ import java.util.Map;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.JuliacModuleItf;
import org.objectweb.fractal.juliac.api.MembraneLoaderItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
......@@ -173,7 +173,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* could be used. This allows reusing pre-generated implementations
* for Julia control interfaces.
*/
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new InterfaceImplementationClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
}
......@@ -184,7 +184,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
*/
// Server (input) interface implementation
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
......
......@@ -29,7 +29,7 @@ import java.lang.reflect.Modifier;
import org.oasisopen.sca.ServiceReference;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.StringHelper;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
......@@ -70,7 +70,7 @@ extends ServerInterfaceClassGenerator {
* The generated client interface extends the class implementing the
* server interface of the same type.
*/
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,membraneDesc,mergeable);
String name = cg.getTargetTypeName();
......@@ -114,7 +114,7 @@ extends ServerInterfaceClassGenerator {
Modifier.PUBLIC, null,
ServiceReference.class.getName()+'<'+it.getFcItfSignature()+'>',
"getServiceReference", null, null );
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new ServiceReferenceClassGenerator(jc,it,membraneDesc,mergeable);
String srclname = cg.getTargetTypeName();
mv.visit (" return new ");
......
......@@ -29,7 +29,7 @@ import java.lang.annotation.Annotation;
import org.oasisopen.sca.annotation.Callback;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
......@@ -158,7 +158,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* could be used. This allows reusing pre-generated implementations
* for Julia control interfaces.
*/
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new InterfaceImplementationClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
}
......@@ -169,7 +169,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
*/
// Server (input) interface implementation
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
......
......@@ -33,7 +33,7 @@ import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.julia.ComponentInterface;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.InterfaceTypeHelper;
import org.objectweb.fractal.juliac.helper.StringHelper;
......@@ -230,7 +230,7 @@ extends AbstractProxyClassGenerator {
InterfaceType cbit =
new BasicInterfaceType(
"callback",callbackClass.getName(),false,false,false);
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new CallBackInterfaceClassGenerator(jc,cbit,null,mergeable);
String cbitfclname = cg.getTargetTypeName();
......
......@@ -27,7 +27,7 @@ import java.io.IOException;
import java.util.List;
import org.objectweb.fractal.api.type.ComponentType;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.desc.ControllerDesc;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.ow2.frascati.tinfi.control.content.IllegalContentClassMetaData;
......@@ -96,14 +96,12 @@ extends org.ow2.frascati.tinfi.opt.oo.FCOOCtrlSourceCodeGenerator {
}
try {
ClassGeneratorItf cg =
TypeGeneratorItf cg =
SCAContentControllerClassGenerator.get(jc,contentClassName);
jc.generateSourceCode(cg);
}
catch( IllegalContentClassMetaData iccmd ) {
IOException ioe = new IOException();
ioe.initCause(iccmd);
throw ioe;
throw new IOException(iccmd);
}
}
}
......@@ -32,7 +32,7 @@ import org.objectweb.fractal.julia.InitializationContext;
import org.objectweb.fractal.julia.factory.ChainedInstantiationException;
import org.objectweb.fractal.julia.loader.Initializable;
import org.objectweb.fractal.julia.loader.Tree;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.desc.ControllerDesc;
import org.objectweb.fractal.juliac.helper.TreeHelper;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
......@@ -84,7 +84,7 @@ extends org.ow2.frascati.tinfi.opt.oo.InitializerOOCtrlClassGenerator {
if( ucscaecc.isAssignableFrom(uc) ) {
// SCA Content Controller
String contentClassName = (String) contentDesc;
ClassGeneratorItf cg = null;
TypeGeneratorItf cg = null;
try {
cg = SCAContentControllerClassGenerator.get(jc,contentClassName);
}
......
......@@ -52,8 +52,8 @@ import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.fraclet.types.Contingency;
import org.objectweb.fractal.julia.InitializationContext;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.JuliacRuntimeException;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.conf.Constants;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.ipf.AnnotationHelper;
......@@ -104,7 +104,7 @@ extends ClassGenerator {
* @throws IllegalArgumentException if the scope is not supported
* @since 1.4.5
*/
public static ClassGeneratorItf get( Juliac jc, String contentClassName )
public static TypeGeneratorItf get( Juliac jc, String contentClassName )
throws IllegalContentClassMetaData {
JuliacConfig jconf = jc.getJuliacConfig();
......@@ -134,7 +134,7 @@ extends ClassGenerator {
}
ContentClassMetaData ccmd = ContentClassMetaData.get(cl);
ClassGeneratorItf scacccg = null;
TypeGeneratorItf scacccg = null;
String scope = ccmd.scope==null ? null : ccmd.scope.toUpperCase();
if( scope == null || scope.equals("STATELESS") ) {
scacccg =
......@@ -790,7 +790,6 @@ extends ClassGenerator {
* injection point can be retrieved, <code>false</code> otherwise. This
* is the case when this is an injection point based on methods but
* that no getter method is available (only a setter in this case.)
*
*/
private boolean generateGetInjectionPointValue(
BlockSourceCodeVisitor blockv, InjectionPoint<?> ip,
......@@ -974,7 +973,7 @@ extends ClassGenerator {
// Fraclet style collection reference
generateGetInjectionPointValue(blockv,ip,"srs",null);
blockv.visitIns("srs.put(name,value)");
}
}
else {
// Singleton reference
generateSetInjectionPointValue(blockv,ip,"value");
......
......@@ -27,7 +27,7 @@ import java.io.IOException;
import java.lang.reflect.Modifier;
import java.util.Date;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.FileSourceCodeVisitor;
......@@ -38,7 +38,7 @@ import org.objectweb.fractal.juliac.visit.FileSourceCodeVisitor;
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 1.3.1
*/
public class EmptySubClassGenerator implements ClassGeneratorItf {
public class EmptySubClassGenerator implements TypeGeneratorItf {
/**
* @param targetname the fully-qualified name of the class to be generated
......@@ -98,8 +98,7 @@ public class EmptySubClassGenerator implements ClassGeneratorItf {
*
* @param cv the visitor for generating the source code of the class
*/
public void generate( ClassSourceCodeVisitor cv ) throws IOException {
public void generate( ClassSourceCodeVisitor cv ) {
int lastdot = targetname.lastIndexOf('.');
String classname = targetname.substring(lastdot+1);
cv.visit( Modifier.PUBLIC, classname, null, superclname, null );
......
......@@ -40,9 +40,9 @@ import org.objectweb.fractal.julia.type.BasicComponentType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.api.ADLParserSupportItf;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.api.MembraneLoaderItf;
import org.objectweb.fractal.juliac.api.RuntimeClassNotFoundException;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.conf.MembraneHelper;
......@@ -358,7 +358,7 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
*/
String compFactClassName = adl + FACTORY_SUFFIX;
String superClassName = icg.getTargetTypeName();
ClassGeneratorItf cg =
TypeGeneratorItf cg =
new EmptySubClassGenerator(compFactClassName,superClassName);
jc.generateSourceCode(cg);
}
......
Supports Markdown
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