Commit ed64294d authored by Lionel Seinturier's avatar Lionel Seinturier

Refactor the Utils class in different Helper classes.

parent 6ecf8422
......@@ -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.Utils;
import org.objectweb.fractal.juliac.StringHelper;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
......@@ -80,7 +80,7 @@ extends ServerInterfaceClassGenerator {
UnifiedClass proxycl = jc.create(it.getFcItfSignature());
String[] tpnames = proxycl.getTypeParameterNames();
if( tpnames.length != 0 ) {
String s = Utils.getTypeParameterNamesSignature(tpnames);
String s = StringHelper.getTypeParameterNamesSignature(tpnames);
name += s;
}
......
......@@ -25,7 +25,7 @@ package org.ow2.frascati.tinfi.opt.oo;
import org.objectweb.fractal.api.factory.InstantiationException;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Utils;
import org.objectweb.fractal.juliac.JuliacHelper;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.ow2.frascati.tinfi.TinfiComponentInterceptor;
......@@ -51,7 +51,7 @@ extends org.objectweb.fractal.juliac.opt.oo.InitializerOOCtrlClassGenerator {
String ctrlDesc = membraneDesc.getDescriptor();
String contentClassName =
Utils.getContentClassName(ctrlDesc,contentDesc);
JuliacHelper.getContentClassName(ctrlDesc,contentDesc);
if( contentClassName != null ) {
InterfaceType[] its = ct.getFcInterfaceTypes();
......
......@@ -26,7 +26,7 @@ package org.ow2.frascati.tinfi.opt.oo;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.Utils;
import org.objectweb.fractal.juliac.StringHelper;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.proxy.AbstractInterceptorSourceCodeGenerator;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
......@@ -104,7 +104,7 @@ extends AbstractInterceptorSourceCodeGenerator {
mv.visit (it.getFcItfSignature());
String[] tpnames = proxycl.getTypeParameterNames();
if( tpnames.length != 0 ) {
String s = Utils.getTypeParameterNamesSignature(tpnames);
String s = StringHelper.getTypeParameterNamesSignature(tpnames);
mv.visit(s);
}
mv.visit (" impl = setRequestContextAndGet(\"");
......
......@@ -25,7 +25,7 @@ package org.ow2.frascati.tinfi.opt.oo;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.Utils;
import org.objectweb.fractal.juliac.StringHelper;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.proxy.AbstractInterceptorSourceCodeGenerator;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
......@@ -93,7 +93,7 @@ extends AbstractInterceptorSourceCodeGenerator {
UnifiedClass proxycl = jc.create(signature);
String[] tpnames = proxycl.getTypeParameterNames();
if( tpnames.length != 0 ) {
String s = Utils.getTypeParameterNamesSignature(tpnames);
String s = StringHelper.getTypeParameterNamesSignature(tpnames);
sb.append(s);
}
......
......@@ -26,7 +26,7 @@ package org.ow2.frascati.tinfi.opt.oo;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.Utils;
import org.objectweb.fractal.juliac.StringHelper;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
......@@ -74,7 +74,7 @@ extends InterfaceImplementationClassGenerator {
UnifiedClass proxycl = jc.create(signature);
String[] tpnames = proxycl.getTypeParameterNames();
if( tpnames.length != 0 ) {
String s = Utils.getTypeParameterNamesSignature(tpnames);
String s = StringHelper.getTypeParameterNamesSignature(tpnames);
sb.append(s);
}
......
......@@ -32,8 +32,9 @@ import org.objectweb.fractal.api.Component;
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.InterfaceTypeHelper;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.Utils;
import org.objectweb.fractal.juliac.StringHelper;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.ipf.AnnotationHelper;
......@@ -105,7 +106,7 @@ extends AbstractProxyClassGenerator {
UnifiedClass proxycl = jc.create(signature);
String[] tpnames = proxycl.getTypeParameterNames();
if( tpnames.length != 0 ) {
String s = Utils.getTypeParameterNamesSignature(tpnames);
String s = StringHelper.getTypeParameterNamesSignature(tpnames);
sb.append(s);
}
......@@ -124,7 +125,7 @@ extends AbstractProxyClassGenerator {
UnifiedClass proxycl = jc.create(signature);
String[] tpnames = proxycl.getTypeParameterNames();
if( tpnames.length != 0 ) {
String s = Utils.getTypeParameterNamesSignature(tpnames);
String s = StringHelper.getTypeParameterNamesSignature(tpnames);
signature += s;
}
......@@ -144,7 +145,7 @@ extends AbstractProxyClassGenerator {
String signature = it.getFcItfSignature();
String[] tpnames = proxycl.getTypeParameterNames();
if( tpnames.length != 0 ) {
String s = Utils.getTypeParameterNamesSignature(tpnames);
String s = StringHelper.getTypeParameterNamesSignature(tpnames);
signature += s;
}
......@@ -240,7 +241,7 @@ extends AbstractProxyClassGenerator {
mv.visitln(ComponentInterface.class.getName()+") service;");
mv.visitln(" "+Component.class.getName()+" owner = ci.getFcItfOwner();");
mv.visit (" "+InterfaceType.class.getName()+" it = ");
mv.visit (Utils.javaify(cbit).toString());
mv.visit (InterfaceTypeHelper.javaify(cbit).toString());
mv.visitln(";");
mv.visitln(" "+cbitfclname+" cbci = new "+cbitfclname+"(owner,\"callback\",it,false,null);");
......
......@@ -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.Utils;
import org.objectweb.fractal.juliac.TreeHelper;
import org.objectweb.fractal.juliac.api.ClassGeneratorItf;
import org.objectweb.fractal.juliac.desc.ControllerDesc;
import org.objectweb.fractal.juliac.ucf.UnifiedClass;
......@@ -97,7 +97,7 @@ extends org.ow2.frascati.tinfi.opt.oo.InitializerOOCtrlClassGenerator {
if( ucinitializable.isAssignableFrom(uc) ) {
Tree tree = ctrlDesc.getTree();
if( tree != null ) {
mv.visitln(" "+Tree.class.getName()+" tree = "+Utils.javaify(tree)+';');
mv.visitln(" "+Tree.class.getName()+" tree = "+TreeHelper.javaify(tree)+';');
mv.visitln(" try {");
mv.visitln(" (("+Initializable.class.getName()+")ctrl).initialize(tree);");
mv.visitln(" }");
......
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