-
Notifications
You must be signed in to change notification settings - Fork 7
Meta model generation with incremental compiler
This document provides insights into the process of meta-model generation by the annotation processor when used in incremental compilation environments. The research was done using the incremental compiler in Eclipse IDE. Other incremental compilers may yield results that differ from those described here.
There are 3 types of structural changes to metamodeled entities that are categorized by their cost:
- Low-cost
- Medium-cost
- High-cost
Each of them is described in turn by using the following language:
-
TheEntity
- entity that was structurally modified and caused the compilation -
TheMetaModel
- meta-model ofTheEntity
-
MetaModels
- the meta-models collection class that is generated as an entry point to all meta-models -
LookupInput
- a list of sources that will be fed as input to the lookup algorithm of the incremental compiler in order to find and recompile sources that might be affected by the structural change. The lookup algorithm is described here.
Low-cost changes don't cause structural changes to TheMetaModel
, which will be regenerated in the same form as it existed previously.
The compiler will then compile TheMetaModel
and compare the .class
files. Seeing that they are the same, it will simply skip it.
The lookup algorithm will then search only for sources that depend on TheEntity
.
LookupInput = [TheEntity]
Medium-cost changes are a subset of those that cause structural changes to TheMetaModel
, such as modification/addition/removal of a property.
They are defined as a subset, because there are other types of changes in the superset, which are high-cost (described below).
TheMetaModel
will be regenerated in a new form (reflecting the change) and recompiled.
The lookup algorithm will then search sources affected both by TheEntity
and TheMetaModel
.
LookupInput = [TheEntity, TheMetaModel]
High-cost changes cause structural changes to both TheMetaModel
and MetaModels
.
They are deemed expensive for the fact that they cause MetaModels
to be structurally modified.
This means that the lookup algorithm will search for sources that depend on TheEntity
, TheMetaModel
and MetaModels
.
The latter will cause the most expensive computation since every user of MetaModels
will be recompiled.
LookupInput = [TheEntity, TheMetaModel, MetaModels]
-
TheEntity
becomes metamodeled, which causesMetaModels
class to be regenerated with a new field. -
TheEntity
is no longer metamodeled, which causes deactivation ofTheMetaModel
and regeneration ofMetaModels
with a new structure.
Per aspera ad astra
- Web UI Design and Web API
- Safe Communication and User Authentication
- Gitworkflow
- JavaScript: Testing with Maven
- Java Application Profiling
-
TG Development Guidelines
- TLS and HAProxy for development
- TG Development Checklist
- Entities and their validation
- Entity Properties
- Entity Type Enhancement
- EQL
- Tooltip How To
- All about Matchers
- Streaming data
- Synthetic entities
- Activatable entities
- Jasper Reports
- Opening Compound Master from another Compound Master
- Window management test plan
- Multi Time Zone Environment
- GraphQL Web API
- Guice
- Maven
- Full Text Search
- Deployment recipes
- Application Configuration
- JRebel Installation and Integration
- Compile-time mechanisms