Bringing Model-driven Object-oriented
#coding
with Declarative, Event-based, Lightweight, & Extensible Design to Java —& to Java interop in Python via Jep
- a complement to Lombok — though
based on generated code instead of AST manipulation — fueling
properties with
Optional
,Stream
/ StreamEx,Future
, & event-based access - a foundation for connecting Java classes more intuitively with data model languages, with data storage, serialization, & with user interface technologies, etc.
Groovy DSL —build.gradle
dependencies {
annotationProcessor group: 'me.modeled', name: 'modeled-java', version: '0.1.0-SNAPSHOT'
implementation group: 'me.modeled', name: 'modeled-java', version: '0.1.0-SNAPSHOT'
}
Kotlin DSL —build.gradle.kts
dependencies {
annotationProcessor(group = "me.modeled", name = "modeled-java", version = "0.1.0-SNAPSHOT")
implementation(group = "me.modeled", name = "modeled-java", version = "0.1.0-SNAPSHOT")
}
- OR through
gradle/libs.versions.toml
— https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml
[versions]
modeled-java = '0.1.0-SNAPSHOT'
[libraries]
modeled-java = { group = 'me.modeled', name = 'modeled-java', version.ref = 'modeled-java' }
Groovy DSL —build.gradle
dependencies {
annotationProcessor libs.modeled.java
implementation libs.modeled.java
}
Kotlin DSL —build.gradle.kts
dependencies {
annotationProcessor(libs.modeled.java)
implementation(libs.modeled.java)
}
<dependency>
<groupId>me.modeled</groupId>
<artifactId>modeled-java</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
For every @Modeled
class,
a sealed
& _Model
-suffixed interface is generated,
which defines a whole variety of default
access methods — getters,
setters, checkers, & requirers; mappers, streamers, listeners, etc. — for
every @Modeled.Property
defined within the @Modeled
class:
import me.modeled.Modeled;