Skip to content

modeled/modeled-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MODELED :: Java

Bringing Model-driven Object-oriented #coding with Declarative, Event-based, Lightweight, & Extensible Design to Java —& to Java interop in Python via Jep

For Java it provides:

  • 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.

For Python, things are yet TODO

Setup // how-to add it to your project

Java :: Gradle

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")
}
[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)
}

Java :: Maven —pom.xml

<dependency>
    <groupId>me.modeled</groupId>
    <artifactId>modeled-java</artifactId>
    <version>0.1.0-SNAPSHOT</version>
</dependency>

#coding // how-to use it in your project

Java :: @Modeled classes, @Modeled.Property fields

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;