Commit bc16b01b authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Move to Juliac-2.2.4-SNAPSHOT.

parent 212ccd8d
......@@ -41,7 +41,6 @@ import org.objectweb.fractal.juliac.desc.ComponentDesc;
import org.objectweb.fractal.juliac.opt.ultramerge.FCUltraMergeAbstractSourceCodeGenerator;
import org.objectweb.fractal.juliac.opt.ultramerge.IllegalComponentCodeException;
import org.objectweb.fractal.juliac.opt.ultramerge.UMClass;
import org.objectweb.fractal.juliac.opt.ultramerge.UMComponentClass;
import org.objectweb.fractal.juliac.opt.ultramerge.UMField;
import org.objectweb.fractal.juliac.opt.ultramerge.UMMethod;
import org.objectweb.fractal.juliac.spoon.SpoonHelper;
......@@ -57,6 +56,7 @@ import spoon.reflect.code.CtBlock;
import spoon.reflect.code.CtExpression;
import spoon.reflect.code.CtFieldAccess;
import spoon.reflect.code.CtStatement;
import spoon.reflect.declaration.CtClass;
import spoon.reflect.declaration.CtField;
import spoon.reflect.declaration.CtMethod;
import spoon.reflect.factory.AnnotationFactory;
......@@ -274,8 +274,8 @@ extends FCUltraMergeAbstractSourceCodeGenerator {
super.mergeabilityCheck(cdesc);
Collection<UMComponentClass<?>> umclasses = repo.getAllUMClasses();
for (UMComponentClass<?> umclass : umclasses) {
Collection<UMClass<?>> umclasses = repo.getAllUMClasses();
for (UMClass<?> umclass : umclasses) {
mergeabilityCheckComponentScopes(umclass);
mergeabilityCheckSetterMethod(umclass);
}
......@@ -284,11 +284,12 @@ extends FCUltraMergeAbstractSourceCodeGenerator {
/**
* Only STATELESS and COMPOSITE scoped-components are supported.
*/
private void mergeabilityCheckComponentScopes( UMComponentClass<?> umclass )
private void mergeabilityCheckComponentScopes( UMClass<?> umclass )
throws IllegalComponentCodeException {
String qname = umclass.getQualifiedName();
UnifiedClass uc = jc.create(qname);
CtClass<?> ctclass = umclass.getCtClass();
String umclassname = ctclass.getQualifiedName();
UnifiedClass uc = jc.create(umclassname);
Scope scope = uc.getAnnotation(Scope.class);
if ( scope != null ) {
......@@ -300,7 +301,7 @@ extends FCUltraMergeAbstractSourceCodeGenerator {
if( !value.equals("STATELESS") && !value.equals("COMPOSITE") ) {
String msg =
"Unsupported scope "+value+" for component class: "+
umclass.getQualifiedName();
umclassname;
throw new IllegalComponentCodeException(msg);
}
}
......@@ -311,12 +312,13 @@ extends FCUltraMergeAbstractSourceCodeGenerator {
* <code>this.field = value;</code>. Else retrieving the field holding the
* reference to the bound component would be too difficult.
*/
private void mergeabilityCheckSetterMethod( UMComponentClass<?> umclass )
private void mergeabilityCheckSetterMethod( UMClass<?> umclass )
throws IllegalComponentCodeException {
Map<UMField<?>,String> refNameByUMClass =
new HashMap<UMField<?>,String>();
String umclassname = umclass.getQualifiedName();
CtClass<?> ctclass = umclass.getCtClass();
String umclassname = ctclass.getQualifiedName();
refNamesByUMClass.put(umclassname,refNameByUMClass);
/*
......@@ -464,7 +466,8 @@ extends FCUltraMergeAbstractSourceCodeGenerator {
for (Map.Entry<UMClass<?>,UMMethod<?>> entry : setters.entrySet()) {
UMClass<?> umclass = entry.getKey();
String umclassname = umclass.getQualifiedName();
CtClass<?> ctclass = umclass.getCtClass();
String umclassname = ctclass.getQualifiedName();
UMClass<?> cl = repo.get(umclassname);
List<UMMethod<?>> methods = cl.getUMMethods();
......@@ -487,7 +490,8 @@ extends FCUltraMergeAbstractSourceCodeGenerator {
for (Map.Entry<UMClass<?>,UMField<?>> entry : setfields.entrySet()) {
UMClass<?> umclass = entry.getKey();
String umclassname = umclass.getQualifiedName();
CtClass<?> ctclass = umclass.getCtClass();
String umclassname = ctclass.getQualifiedName();
UMField<?> umfield = entry.getValue();
String umfieldname = umfield.getSimpleName();
......@@ -504,14 +508,14 @@ extends FCUltraMergeAbstractSourceCodeGenerator {
// ----------------------------------------------------------------------
@Override
protected List<UMField<?>>
getBoundReferenceFields( UMComponentClass<?> umclass ) {
protected List<UMField<?>> getBoundReferenceFields( UMClass<?> umclass ) {
// Retrieve @Reference annotated fields
List<UMField<?>> fields = super.getBoundReferenceFields(umclass);
// Retrieve fields with are set by @Reference annotated setter methods
String umclassname = umclass.getQualifiedName();
CtClass<?> ctclass = umclass.getCtClass();
String umclassname = ctclass.getQualifiedName();
Map<UMField<?>,String> refNameByUMClass =
refNamesByUMClass.get(umclassname);
if( refNameByUMClass == null ) {
......
......@@ -519,7 +519,7 @@ public class EMFParserSupportImpl {
BindingDesc bdesc =
new BindingDesc(bindingType,clt,cltItfName,srv,srvItfName);
clt.addBinding(cltItfName,bdesc);
clt.putBinding(cltItfName,bdesc);
}
private void handleProperty(
......@@ -528,7 +528,7 @@ public class EMFParserSupportImpl {
String name = propvalue.getName();
String value = propvalue.getValue();
AttributeDesc adesc = new AttributeDesc(cdesc,null,name,value);
cdesc.addAttribute(name,adesc);
cdesc.putAttribute(name,adesc);
}
/**
......
......@@ -122,7 +122,7 @@
<properties>
<julia.version>2.5.2</julia.version>
<juliac.version>2.2.3</juliac.version>
<juliac.version>2.2.4-SNAPSHOT</juliac.version>
</properties>
<!-- ======================= -->
......
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