[code-reflection] RFR: Refactor type element

Maurizio Cimadamore mcimadamore at openjdk.org
Thu May 2 10:23:08 UTC 2024


On Wed, 1 May 2024 21:42:41 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> Rename `TypeElement` to `CodeType`, thereby avoiding confusion with `javax.lang.model.element.TypeElement` (`CodeType` is closer to `javax.lang.model.type.TypeMirror` and `java.lang.reflect.Type`).
> 
> Rename `TypeDefintion` to `ExternalizedCodeType` and enclose within `CodeType`.
> 
> It's possible to go further and define a subtype `ExternalizableCodeType` that supports externalization to `ExternalizedCodeType`, copying the pattern for operations. This requires some adjustments to the externalization of types that may be composed of other posssibly non-externalizable types e.g. `FunctionType`. We can consider this separately to this PR.

Have you considered the name OpType? Since the code model API is mainly about "ops" and types are meta-data attached to such ops, the name seems a bit less general than "code type".

-------------

PR Comment: https://git.openjdk.org/babylon/pull/70#issuecomment-2090105682


More information about the babylon-dev mailing list