Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8134121

JShell API: Declaration naming: Snippet, Kind, and internally Key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9-repo-kulla
    • 9-repo-kulla
    • tools
    • None

      Currently there is:

          Snippet
            PersistentSnippet
              ImportSnippet
              DeclarationSnippet
                MethodDeclSnippet
                VariableDeclSnippet
                TypeDeclSnippet
            StatementSnippet
            ExpressionSnippet
            ErroneousSnippet

      and these Kind values corresponding to concrete classes:

          IMPORT
          METHOD_DECL
          VARIABLE_DECL
          TYPE_DECL
          STATEMENT
          EXPRESSION
          ERRONEOUS

      I've heard objections to the XxxDeclSnippet format of names. My issue with just dropping it Decl is that "Variable" alone is somewhat ambiguous (to which I've heard the suggestion, of using "Var"), and more significantly that "Type" by itself is just plane confusing.

      So, these changes ---

                MethodSnippet
                VarSnippet
                TypeDeclSnippet

      and:

          METHOD
          VAR
          TYPE_DECL

      And corresponding changes in *Key.



            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: