JMixer is the implementation of a mixin mechanism for the Java language
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.travis.yml
LICENSE.txt
README.md
build.gradle
pom.xml

README.md

JMixer

JMixer is the implementation of a mixin mechanism for the Java language.

The @Mixin annotation is defined to enable to mix in the annotated class the code of the classes referenced in the parameter of the annotation. As an example, the following code mixes in the Duck class the code from the Flying and Swimming classes.

@Mixin(value={Flying.class, Swimming.class})
public class Duck extends Bird {}
public class Bird {}

public class Flying {
  public void fly() {}
}

public class Swimming{
  public void swim() {}
}

The mixin mechanism can be seen as a replacement for multiple inheritance.

Author: Lionel Seinturier