Commit 41fa8b61 authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Remove UnifiedClassHelper and move UClass down one level in the package hierarchy.

parent 92461ffd
......@@ -30,6 +30,7 @@ import java.util.Map;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.api.JuliacModuleItf;
import org.objectweb.fractal.juliac.api.MembraneLoaderItf;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
......@@ -37,11 +38,10 @@ import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.desc.NoSuchControllerDescriptorException;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.ipf.AnnotationHelper;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
import org.objectweb.fractal.juliac.proxy.ProxyClassGeneratorItf;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.ucf.UnifiedClassHelper;
import org.ow2.frascati.tinfi.opt.oo.CallBackInterfaceClassGenerator;
import org.ow2.frascati.tinfi.opt.oo.ClientInterfaceClassGenerator;
import org.ow2.frascati.tinfi.opt.oo.SCAComposite;
......@@ -207,8 +207,8 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
String signature = it.getFcItfSignature();
UClass cl = jc.create(signature);
Annotation annot =
UnifiedClassHelper.getAnnotation(
cl,
ClassHelper.getAnnotation(
cl.cl,
"org.oasisopen.sca.annotation.Callback",
"org.osoa.sca.annotations.Callback");
if( annot != null ) {
......
......@@ -30,9 +30,9 @@ import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.Type;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.proxy.AbstractProxyClassGenerator;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.osoa.sca.annotations.EndsConversation;
......
......@@ -30,10 +30,10 @@ 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.UClass;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.ow2.frascati.tinfi.TinfiComponentOutInterface;
......
......@@ -29,15 +29,15 @@ 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.UClass;
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;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.ipf.AnnotationHelper;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
import org.objectweb.fractal.juliac.proxy.ProxyClassGeneratorItf;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.ucf.UnifiedClassHelper;
/**
* This class generates the source code associated to Fractal components.
......@@ -192,8 +192,8 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
String signature = it.getFcItfSignature();
UClass cl = jc.create(signature);
Annotation annot =
UnifiedClassHelper.getAnnotation(
cl,
ClassHelper.getAnnotation(
cl.cl,
Callback.class.getName(),
"org.osoa.sca.annotations.Callback");
if( annot != null ) {
......
......@@ -25,8 +25,8 @@ package org.ow2.frascati.tinfi.opt.oo;
import java.lang.reflect.Method;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
......@@ -55,7 +55,7 @@ extends org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator {
public void generateProxyMethodBodyDelegatingCode(
BlockSourceCodeVisitor mv, UClass proxycl, Method proxym ) {
String rtypename = UClass.getGenericReturnType(proxym);
String rtypename = UClass.getGenericReturnType(proxym,proxycl);
if( rtypename.equals("void") ) {
mv.visitln(" ijp.proceed();");
......
......@@ -28,10 +28,10 @@ import java.lang.reflect.Method;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.proxy.AbstractInterceptorSourceCodeGenerator;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.osoa.sca.annotations.EndsConversation;
......
......@@ -30,11 +30,11 @@ import java.lang.reflect.Modifier;
import org.objectweb.fractal.api.Interface;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.helper.MethodHelper;
import org.objectweb.fractal.juliac.proxy.AbstractInterceptorSourceCodeGenerator;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.ow2.frascati.tinfi.IntentJoinPointImpl;
......@@ -304,7 +304,7 @@ extends AbstractInterceptorSourceCodeGenerator {
*/
String proxymname = proxym.getName();
Class<?>[] ptypes = proxym.getParameterTypes();
String rtypename = UClass.getGenericReturnType(proxym);
String rtypename = UClass.getGenericReturnType(proxym,proxycl);
String[] tpnames = MethodHelper.getTypeParameterNames(proxym);
mv.visitln(" if( handlers.size() == 0 ) {");
......
......@@ -25,10 +25,10 @@ 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.UClass;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.proxy.AbstractInterceptorSourceCodeGenerator;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.ow2.frascati.tinfi.TinfiComponentInterceptor;
......
......@@ -26,10 +26,10 @@ 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.UClass;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.ow2.frascati.tinfi.TinfiComponentInterface;
......
......@@ -34,6 +34,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.UClass;
import org.objectweb.fractal.juliac.api.TypeGeneratorItf;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.helper.ClassHelper;
......@@ -41,8 +42,6 @@ import org.objectweb.fractal.juliac.helper.InterfaceTypeHelper;
import org.objectweb.fractal.juliac.helper.MethodHelper;
import org.objectweb.fractal.juliac.ipf.AnnotationHelper;
import org.objectweb.fractal.juliac.proxy.AbstractProxyClassGenerator;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.ucf.UnifiedClassHelper;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.osoa.sca.annotations.Conversational;
......@@ -198,8 +197,8 @@ extends AbstractProxyClassGenerator {
callbackClass = Void.class; // callback.value() defaults to Void
Annotation callback =
UnifiedClassHelper.getAnnotation(
proxycl,
ClassHelper.getAnnotation(
proxycl.cl,
Callback.class.getName(),
"org.osoa.sca.annotations.Callback");
if( callback != null ) {
......
......@@ -32,10 +32,10 @@ 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.UClass;
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.UClass;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.ow2.frascati.tinfi.TinfiRuntimeException;
......
......@@ -25,7 +25,7 @@ package org.ow2.frascati.tinfi.opt.oo.light;
import java.lang.reflect.Method;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
/**
......
......@@ -1240,7 +1240,7 @@ extends ClassGenerator {
* (should be Outter.Inner).
*
* This method is copied from
* {@link org.objectweb.fractal.juliac.ucf.UClass#getName(Class)}.
* {@link org.objectweb.fractal.juliac.UClass#getName(Class)}.
*
* @since 1.4.3
*/
......
......@@ -40,6 +40,7 @@ import org.objectweb.fractal.fraclet.types.Constants;
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.UClass;
import org.objectweb.fractal.juliac.api.ADLParserSupportItf;
import org.objectweb.fractal.juliac.api.MembraneLoaderItf;
import org.objectweb.fractal.juliac.api.RuntimeClassNotFoundException;
......@@ -48,10 +49,9 @@ import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.conf.MembraneHelper;
import org.objectweb.fractal.juliac.desc.ComponentDesc;
import org.objectweb.fractal.juliac.helper.ClassHelper;
import org.objectweb.fractal.juliac.helper.FieldHelper;
import org.objectweb.fractal.juliac.opt.InitializerClassGenerator;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.objectweb.fractal.juliac.ucf.UnifiedClassHelper;
/**
* <p>
......@@ -169,8 +169,7 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
* TODO support @Component from the Fractal Fraclet API
*/
Map<String,Class<?>> servicemap = new HashMap<String,Class<?>>();
Service serviceannot =
UnifiedClassHelper.getAnnotation(uc,Service.class);
Service serviceannot = ClassHelper.getAnnotation(uc.cl,Service.class);
if( serviceannot != null ) {
// Service types and names
......@@ -202,7 +201,7 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
Map<String,Boolean> refcontingencymap = new HashMap<String,Boolean>();
Map<String,Boolean> refcardinalitymap = new HashMap<String,Boolean>();
UClass uclist = jc.create(List.class.getName());
Field[] fields = UnifiedClassHelper.getAllFields(uc);
Field[] fields = ClassHelper.getAllFields(uc.cl);
fields = FieldHelper.removeOverriden(fields);
for (Field field : fields) {
......@@ -299,7 +298,7 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
* If none of them apply, the scaPrimitive value is taken by default.
*/
String controller = "scaPrimitive";
Membrane mAnnot = UnifiedClassHelper.getAnnotation(uc,Membrane.class);
Membrane mAnnot = ClassHelper.getAnnotation(uc.cl,Membrane.class);
if( mAnnot != null ) {
controller = mAnnot.controller();
......@@ -335,7 +334,7 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
* descripors. Used by Easy* from Petals Link.
*/
PolicySets psAnnot =
UnifiedClassHelper.getAnnotation(uc,PolicySets.class);
ClassHelper.getAnnotation(uc.cl,PolicySets.class);
if( psAnnot != null ) {
final String prefix = "frascati:";
String[] strs = psAnnot.value();
......
......@@ -35,6 +35,7 @@ import org.oasisopen.sca.annotation.Property;
import org.oasisopen.sca.annotation.Reference;
import org.oasisopen.sca.annotation.Scope;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.UClass;
import org.objectweb.fractal.juliac.api.JuliacRuntimeException;
import org.objectweb.fractal.juliac.desc.AttributeDesc;
import org.objectweb.fractal.juliac.desc.ComponentDesc;
......@@ -44,7 +45,6 @@ import org.objectweb.fractal.juliac.opt.ultramerge.UMClass;
import org.objectweb.fractal.juliac.opt.ultramerge.UMField;
import org.objectweb.fractal.juliac.opt.ultramerge.UMMethod;
import org.objectweb.fractal.juliac.spoon.helper.CtNamedElementHelper;
import org.objectweb.fractal.juliac.ucf.UClass;
import org.ow2.frascati.tinfi.TinfiRuntimeException;
import spoon.reflect.code.CtAssignment;
......
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