Commit c240a7d8 authored by seinturier's avatar seinturier

New tinfi-metata module.

parent 7e1e59b3
......@@ -57,10 +57,11 @@ See http://maven.apache.org for instructions on downloading and using Maven.
2. Introduction
---------------
Tinfi is composed of 7 modules:
Tinfi is composed of 8 modules:
- all: the superset of all Tinfi Maven artifacts
- compiler: this is the main module which contains the implementation of Tinfi
- examples: sample applications
- metadata: API for storing and retrieving metadata associated with code
- mixins: library which implements the control of logic for SCA/Tinfi components
- runtime: the library needed to run an application with Tinfi
- tests-conf: Tinfi conformance tests
......@@ -186,4 +187,4 @@ To run the conformance tests, type:
For any question, please contact: Lionel.Seinturier@univ-lille1.fr
Date of creation of this file: June 24, 2007.
Last modified: October 24, 2008.
Last modified: November 2, 2008.
......@@ -3,6 +3,7 @@ Tinfi 0.4.3
* manage property promotions
* for the completion API, let the dynamically set metadata override annotations
* move to Juliac 2.1.3
* new metadata module
Tinfi 0.4.2
......
......@@ -29,6 +29,16 @@
<version>${project.version}</version>
</dependency>
<!-- ================================================== -->
<!-- Metadata API -->
<!-- ================================================== -->
<dependency>
<groupId>org.scorware.tinfi</groupId>
<artifactId>frascati-tinfi-metadata</artifactId>
<version>${project.version}</version>
</dependency>
<!-- ================================================== -->
<!-- Optimization levels -->
<!-- ================================================== -->
......
......@@ -33,6 +33,7 @@ import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.ClassGenerator;
import org.objectweb.fractal.juliac.InitializerClassGenerator;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.JuliacConfig;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.desc.NoSuchControllerDescriptorException;
import org.objectweb.fractal.juliac.proxy.AttributeControllerClassGenerator;
......@@ -77,12 +78,13 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
/*
* Register component interceptor code generators.
*/
jc.putInterceptorSourceCodeGenerator(
JuliacConfig jconf = jc.getJuliacConfig();
jconf.putInterceptorSourceCodeGenerator(
"org.scorware.tinfi.asm.SCAContentInterceptorCodeGenerator",
new SCAContentInterceptorSourceCodeGenerator() );
jc.putInterceptorSourceCodeGenerator(
SCAContentInterceptorSourceCodeGenerator.class.getName() );
jconf.putInterceptorSourceCodeGenerator(
"org.scorware.tinfi.asm.SCAIntentInterceptorCodeGenerator",
new SCAIntentInterceptorSourceCodeGenerator() );
SCAIntentInterceptorSourceCodeGenerator.class.getName() );
}
// -----------------------------------------------------------------------
......@@ -175,7 +177,9 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
@Override
protected void setInterceptorSourceCodeGenerator(
Map<?,?> context, MembraneDesc membraneDesc )
throws NoSuchControllerDescriptorException {
throws
NoSuchControllerDescriptorException, IllegalArgumentException,
ClassNotFoundException {
String desc = membraneDesc.getDescriptor();
if( ! desc.startsWith("sca") ) {
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.scorware.tinfi</groupId>
<artifactId>frascati-tinfi-runtime-parent</artifactId>
<version>0.4.3-SNAPSHOT</version>
</parent>
<groupId>org.scorware.tinfi</groupId>
<artifactId>frascati-tinfi-metadata</artifactId>
<packaging>jar</packaging>
<name>Tinfi Metadata API</name>
</project>
......@@ -21,7 +21,7 @@
* Author: Lionel Seinturier
*/
package org.scorware.tinfi.control.content;
package org.scorware.tinfi.metadata;
import java.lang.annotation.Annotation;
import java.lang.reflect.AccessibleObject;
......@@ -47,9 +47,9 @@ import java.util.Map;
* </ul>
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 0.3
* @since 0.4.3
*/
public class ClassMetaData {
public class MetaData {
// -----------------------------------------------------------------------
// Class holding the metadata
......
......@@ -44,9 +44,9 @@ import org.objectweb.fractal.juliac.runtime.ClassLoaderItf;
import org.objectweb.fractal.juliac.runtime.Juliac;
import org.scorware.tinfi.TinfiComponentInterceptor;
import org.scorware.tinfi.TinfiRuntimeException;
import org.scorware.tinfi.control.content.ClassMetaData;
import org.scorware.tinfi.control.content.ContentClassMetaData;
import org.scorware.tinfi.control.content.IllegalContentClassMetaData;
import org.scorware.tinfi.metadata.MetaData;
/**
* Mixin layer for implementing the {@link SCAIntentController} interface.
......@@ -91,7 +91,7 @@ implements Controller, SCAIntentController {
_super_initFcController(ic);
}
private ClassMetaData cmd;
private MetaData cmd;
// -------------------------------------------------------------------------
// Implementation of the SCAIntentController interface
......
......@@ -14,10 +14,11 @@
<properties>
<julia.version>2.5.2</julia.version>
<juliac.version>2.1.3</juliac.version>
<juliac.version>2.1.4-SNAPSHOT</juliac.version>
</properties>
<modules>
<module>metadata</module>
<module>runtime</module>
<module>mixins</module>
<module>compiler</module>
......
......@@ -24,6 +24,11 @@
<artifactId>juliac-runtime</artifactId>
<version>${juliac.version}</version>
</dependency>
<dependency>
<groupId>org.scorware.tinfi</groupId>
<artifactId>frascati-tinfi-metadata</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -37,7 +37,7 @@ import java.util.Map;
import java.util.Set;
import org.scorware.tinfi.TinfiRuntimeException;
import org.scorware.tinfi.control.content.ClassMetaData;
import org.scorware.tinfi.metadata.MetaData;
/**
* This class manages the elements either {@link Field}s or {@link Method}s
......@@ -54,13 +54,12 @@ public class AnnotatedElementsManager {
new HashMap<String,AnnotatedElement>();
/** The instance for accessing the class and its metadata. */
private ClassMetaData cmd;
private MetaData cmd;
/** The annotation. */
private Class<? extends Annotation> annot;
public AnnotatedElementsManager(
ClassMetaData cmd, Class<? extends Annotation> annot ) {
public AnnotatedElementsManager( MetaData cmd, Class<? extends Annotation> annot ) {
this.cmd = cmd;
this.annot = annot;
......
......@@ -48,6 +48,7 @@ import org.osoa.sca.annotations.Init;
import org.osoa.sca.annotations.Property;
import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Scope;
import org.scorware.tinfi.metadata.MetaData;
/**
* This class stores SCA related metadata for the content class of a component.
......@@ -55,7 +56,7 @@ import org.osoa.sca.annotations.Scope;
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @author Philippe Merle <Philippe.Merle@lifl.fr>
*/
public class ContentClassMetaData extends ClassMetaData {
public class ContentClassMetaData extends MetaData {
// -----------------------------------------------------------------------
// Factory
......
......@@ -29,8 +29,8 @@ import org.objectweb.fractal.api.factory.InstantiationException;
import org.osoa.sca.annotations.Reference;
import org.scorware.tinfi.control.content.AnnotatedElementNotFoundException;
import org.scorware.tinfi.control.content.AnnotatedElementsManager;
import org.scorware.tinfi.control.content.ClassMetaData;
import org.scorware.tinfi.control.content.DuplicateAnnotatedElementException;
import org.scorware.tinfi.metadata.MetaData;
/**
* Class for testing the {@link ReferenceManagerImpl}.
......@@ -42,7 +42,7 @@ public class AnnotatedElementsManagerTestCase extends TestCase {
public void testReferenceMustNotBeFound()
throws DuplicateAnnotatedElementException {
ClassMetaData cmd = new ClassMetaData();
MetaData cmd = new MetaData();
cmd.setSupportClass(ReferenceNotFoundImpl.class);
AnnotatedElementsManager aem =
......@@ -67,7 +67,7 @@ public class AnnotatedElementsManagerTestCase extends TestCase {
public void testReferenceShouldBeFound()
throws DuplicateAnnotatedElementException, AnnotatedElementNotFoundException {
ClassMetaData cmd = new ClassMetaData();
MetaData cmd = new MetaData();
cmd.setSupportClass(ReferenceNotFoundImpl.class);
AnnotatedElementsManager aem =
......
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