JEP 119 / Implementation of javax.lang.model.util.Types (original) (raw)

Florian Schoppmann mail at florian-schoppmann.net
Tue May 26 02:57:14 UTC 2015


Hi all,

This Github repository of mine <https://github.com/fschopp/java-types> provides an abstract skeletal implementation of the type-system related methods of interface javax.lang.model.util.Types, plus a concrete realization backed by the core Java Reflection API, akin to JEP 119 by Joe Darcy.

Obviously, there also exists an official JEP 119 implementation, so far in proof-of-concept state: <http://hg.openjdk.java.net/jdk9/jdk9/langtools/file/82d0e10df078/src/sample/share/language/model/CoreReflectionFactory.java>

In their current states, the two projects have slightly different goals: E.g., CoreReflectionFactory.java in the official JEP 119 implementation does not yet implement all subtyping-related relations like, e.g., JLS ยง4.5.1 "contains", whereas my project is so far only concerned with subtyping but does not implement any Element-subinterfaces except TypeElement). Moreover, JEP 119 is only concerned with backing javax.lang.model by Core Reflection, whereas the goal of my project is to allow arbitrary backing (say, e.g., by the domain model of some DSL that needs to support the Java type system).

If there should be any interest in using my code or parts of it for the JDK, I would be happy to help with any necessary adjustments.

Florian

PS: X-post to core-libs.devel and compiler.devel. Follow-up to core-libs suggested.



More information about the core-libs-dev mailing list