Home

Documentation

* Programming Guide * CJDT User Guide * Publications * Tutorial * Language Spec.

Examples

Downloads

Source Code

FAQ

Community Info

About Us

 

 
Search:
 
ST Logo
TUD Logo

FAQ

General Questions

Does CaesarJ supports inter-type declarations like that of AspectJ?

No, we don't support AspectJ inter-type declarations, except "declare precedence". We use bindings to extend static structure.

Where are the "provided" and "expected" modifiers and the collaboration interface construct that are used in the scientific Caesar publications?

One goal in the definition of CaesarJ is that we want to add as few new language constructs as possible in order to keep the language as simple, uniform, and orthogonal as possible. Virtual classes are the most important universal construct in CaesarJ, and they can be used to express collaboration interfaces, bindings, and components (and much more).

By means of virtual classes, collaboration interfaces, components, and bindings can be expressed in a design-pattern like style:

 
abstract public cclass SomeCI {
   abstract public cclass ARole {
      abstract public /*expected*/ void m1();
      abstract public /*provided*/ void m2();
   }
}

abstract public cclass SomeComponent extends SomeCI {
   abstract public cclass ARole {
      public void m1() {/* implementation of provided part*/}
   }
}

abstract public cclass SomeBinding extends SomeCI {
   public cclass ARole wraps SomeApplicationClass {
      public void m2() {/* implementation of expected part*/}
   }
}

public cclass AWeavlet extends SomeComponent & SomeBinding {}
...
deploy( new AWeavlet() ) {....}
...

Nevertheless, the additional checks in the form of "expected" and "provided" modifiers are important in order to ensure the correct usage of an interface. These constraints cannot be checked with the current compiler. Instead of adding these modifiers directly to the language, we are currently designing a more general interface constraint mechanism that can be used to express the kinds of constraints expressed as "provided" and "expected" in the papers, but also other interesting constraints regarding interface usage in a component setting.


Didn't find answer to your question? - Feel free to post it to our mailing list.