Skip to content

Annotations, Reflection Improvements and new Gradle plugin

Compare
Choose a tag to compare
@miho miho released this 24 Jan 14:09
· 506 commits to master since this release

Annotations:

Models can now be annotated, e.g.,

@Annotation(key = "key 1", value = "my value")
interface AnnotatedModel {

    @Annotation(key="prop key 1", value = "my prop value")
    String getName();
} 

This makes querying specific objects or properties much easier.

Reflection:

Reflection works now directly on a type, e.g.:

Reflection r = MyParent.type().reflect()

Additionally, properties can be observed via the reflection API:

prop.addChangeListener(change ->
  // react to changes
);

Gradle Plugin:

The gradle plugin registers vmf properly now, just like java and resources are registered. Each source set can use its own dependencies for model generation.

Support for IntelliJ IDEA and VS Code has been improved (vmf folder is recognized as source root). The property

ext.vmfPluginIntelliJIntegration = true

enables the additional support (vmf folders are added ass source root and generated src dirs are marked as being generated, i.e., intellij will warn whenever a change is made to the generated file).