Commit 81b6b67b authored by seinturi's avatar seinturi

Refactor: rename TypeGeneratorItf into SourceCodeGeneratorItf.

parent 5f79869a
......@@ -66,7 +66,7 @@ import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.api.type.TypeFactory;
import org.objectweb.fractal.julia.type.BasicComponentType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.StringHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.desc.AbstractADLSupportImpl;
......@@ -125,7 +125,7 @@ public class EMFParserSupportImpl extends AbstractADLSupportImpl<Composite> {
}
@Override
protected TypeGeneratorItf getComponentDescFactoryClassGenerator(
protected SourceCodeGeneratorItf getComponentDescFactoryClassGenerator(
ComponentDesc cdesc, String targetname ) {
return new ComponentDescFactoryClassGenerator(jc,cdesc,targetname);
......
......@@ -32,7 +32,7 @@ import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
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.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.annotation.AnnotationHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
......@@ -172,7 +172,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* could be used. This allows reusing pre-generated implementations
* for Julia control interfaces.
*/
TypeGeneratorItf cg =
SourceCodeGeneratorItf cg =
new InterfaceImplementationClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
}
......@@ -183,7 +183,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
*/
// Server (input) interface implementation
TypeGeneratorItf cg =
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
......
......@@ -30,7 +30,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.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
......@@ -69,7 +69,7 @@ extends ServerInterfaceClassGenerator {
* The generated client interface extends the class implementing the
* server interface of the same type.
*/
TypeGeneratorItf cg =
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,membraneDesc,mergeable);
String name = cg.getTargetTypeName();
......@@ -113,7 +113,7 @@ extends ServerInterfaceClassGenerator {
Modifier.PUBLIC, null,
ServiceReference.class.getName()+'<'+it.getFcItfSignature()+'>',
"getServiceReference", null, null );
TypeGeneratorItf cg =
SourceCodeGeneratorItf 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.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.annotation.AnnotationHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
......@@ -157,7 +157,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* could be used. This allows reusing pre-generated implementations
* for Julia control interfaces.
*/
TypeGeneratorItf cg =
SourceCodeGeneratorItf cg =
new InterfaceImplementationClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
}
......@@ -168,7 +168,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
*/
// Server (input) interface implementation
TypeGeneratorItf cg =
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,null,false);
jc.generateSourceCode(cg);
......
......@@ -35,7 +35,7 @@ import org.objectweb.fractal.julia.ComponentInterface;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.annotation.AnnotationHelper;
import org.objectweb.fractal.juliac.commons.lang.reflect.AnnotatedElementHelper;
......@@ -231,7 +231,7 @@ extends AbstractProxyClassGenerator {
InterfaceType cbit =
new BasicInterfaceType(
"callback",callbackClass.getName(),false,false,false);
TypeGeneratorItf cg =
SourceCodeGeneratorItf 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.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.desc.ControllerDesc;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.ow2.frascati.tinfi.control.content.IllegalContentClassMetaData;
......@@ -96,7 +96,7 @@ extends org.ow2.frascati.tinfi.opt.oo.FCOOCtrlSourceCodeGenerator {
}
try {
TypeGeneratorItf cg =
SourceCodeGeneratorItf cg =
SCAContentControllerClassGenerator.get(jc,contentClassName);
jc.generateSourceCode(cg);
}
......
......@@ -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.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.desc.ControllerDesc;
import org.objectweb.fractal.juliac.helper.TreeHelper;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
......@@ -78,7 +78,7 @@ extends org.ow2.frascati.tinfi.opt.oo.InitializerOOCtrlClassGenerator {
if( SCAExtendedContentController.class.isAssignableFrom(cl) ) {
// SCA Content Controller
String contentClassName = (String) contentDesc;
TypeGeneratorItf cg = null;
SourceCodeGeneratorItf cg = null;
try {
cg = SCAContentControllerClassGenerator.get(jc,contentClassName);
}
......
......@@ -52,7 +52,7 @@ 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.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.ipf.CompositeInjectionPointHashMap;
import org.objectweb.fractal.juliac.commons.ipf.InjectionPoint;
import org.objectweb.fractal.juliac.commons.ipf.InjectionPointFieldImpl;
......@@ -104,13 +104,13 @@ extends ClassGenerator {
* @throws IllegalArgumentException if the scope is not supported
* @since 1.4.5
*/
public static TypeGeneratorItf get( Juliac jc, String contentClassName )
public static SourceCodeGeneratorItf get( Juliac jc, String contentClassName )
throws IllegalContentClassMetaData {
Class<?> cl = jc.loadClass(contentClassName);
ContentClassMetaData ccmd = ContentClassMetaData.get(cl);
TypeGeneratorItf scacccg = null;
SourceCodeGeneratorItf scacccg = null;
String scope = ccmd.scope==null ? null : ccmd.scope.toUpperCase();
if( scope == null || scope.equals("STATELESS") ) {
scacccg =
......
......@@ -27,7 +27,7 @@ import java.io.IOException;
import java.lang.reflect.Modifier;
import java.util.Date;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
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 TypeGeneratorItf {
public class EmptySubClassGenerator implements SourceCodeGeneratorItf {
/**
* @param targetname the fully-qualified name of the class to be generated
......
......@@ -44,7 +44,7 @@ import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.api.ADLParserSupportItf;
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.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.reflect.FieldHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
......@@ -361,7 +361,7 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
*/
String compFactClassName = adl + FACTORY_SUFFIX;
String superClassName = icg.getTargetTypeName();
TypeGeneratorItf cg =
SourceCodeGeneratorItf cg =
new EmptySubClassGenerator(compFactClassName,superClassName);
jc.generateSourceCode(cg);
}
......
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