EKOSdocs
Docs / Guides Build

Indexing Java Applications

JVM support: a deterministic Java source analyzer in the open-source build, compiled class/JAR recovery in the extension build.

There are two routes, depending on whether you have the source.

You have the source

The open-source build reads .java files with its own hand-written parser (no C toolchain, no JDK) and makes no model call. .java files under an observe path or source are picked up by the normal pipeline:

ekos build && ekos recover && ekos resolve && ekos compile && ekos commit
ekos ekl "FIND Object WHERE kind = 'JavaMethod' AND name CONTAINS 'complete' LIMIT 20"
Recovered Detail
JavaType classes, interfaces, enums, records, annotation types, nested types; Javadoc
JavaMethod methods and constructors with spans, signatures and visibility
inheritance and imports Extends, Implements, DependsOn, resolved the way Java resolves names, and only to types in the observed tree. A library type is listed, never invented
SQL in method bodies String / StringBuilder concatenation, constants through the supertype chain, DB.* calls and new Query(…) folded, parsed and linked to the tables they read and write (ReadsFrom / WritesTo). Each statement is labelled parsed, partial or unparsed
ticket anchors with [tickets] keys, a ticket id in a comment is anchored to the type or method it sits in

There is no Calls graph: the receiver types of local variables are unknown without type inference.

iDempiere and ADempiere application models

For the iDempiere/ADempiere family, the generated I_* / X_* classes become ModelTable objects: every column with its business name, description, list values and labels, mandatory flag and default, updatability and code-declared foreign key. A ModelTable is a claim made by code. It is never merged into the database's own Table; when the live database is connected too, the two are compared and every disagreement becomes a conflict (Indexing a Database). Generated files get no JavaMethod objects, since their getters and setters only restate the columns.

Measured on iDempiere release-13: 4,542 of 4,542 files parsed, 4,820 types, 31,434 methods, 763 model tables with 16,660 columns and 2,882 code-declared references, and 3,207 embedded SQL statements (1,992 parsed, 996 partial, 219 unparsed), with zero model calls. Use a release build for a tree that size.

ekos check refs then reports Java SQL that names a table no schema defines; see Checking Reference Integrity.

You only have compiled classes

.class, .jar, .war and .ear are handled by the same extension build as .NET (Indexing .NET Applications): types, methods, signatures, fields, the call graph, branch structure, constants and I/O boundaries, read from bytecode in-process with no JRE required.

The extension build also recovers JVM method bodies to statements (RFC 0206), as RFC 0150 does for .NET: 93.8% of the method bodies of pdfbox.jar. Constructs it cannot follow, such as pre-Java-6 jsr/ret subroutines, are reported as gaps rather than guessed. The same decompiler lets EKOS Lakehouse translate compiled Pentaho plugin steps (Translating Pentaho to dbt).