Kulla: API naming question JLS vs JVM class
Rémi Forax
forax at univ-mlv.fr
Sun Jun 21 08:06:41 UTC 2015
TYPE is ok for me.
Rémi
Le 21 juin 2015 04:19:15 CEST, Robert Field <robert.field at oracle.com> a écrit :
>Keys for what is called a "class" in the JVM (that is a class, enum,
>interface, or annotation interface in JLS speak) have Key.Kind.CLASS
>and
>are instances of Key.ClassKey.
>
>This is awkward both in terms of documenting them (I'm referencing the
>JLS) and because the SubKind values are JLS-speak:
>
> CLASS_SUBKIND(Key.Kind.CLASS),
> INTERFACE_SUBKIND(Key.Kind.CLASS),
> ENUM_SUBKIND(Key.Kind.CLASS),
> ANNOTATION_TYPE_SUBKIND(Key.Kind.CLASS),
>
>Looking at the JLS the syntax production is TypeDeclaration. So, I
>think the Key.Kind should be changed to TYPE.
>
>It could be changed to TYPE_DECLARATION but then we would want to also
>change VARIABLE and METHOD to
>
> VARIABLE_DECLARATION
> METHOD_DECLARATION
>
>Which would make use pretty verbose. Could be abbreviated, but the API
>
>currently mostly shies away from abbreviations.
>
>So, the choices are:
>
>(1) TYPE TypeKey
>
>(2) TYPE_DECLARATION TypeDeclarationKey
>
>(3) TYPE_DECL TypeDeclKey
>
>(4) CLASS ClassKey
>
>What do you all think?
>
>Thanks,
>Robert
More information about the kulla-dev
mailing list