Skip to content

Commit e7a9d3d

Browse files
[inspect] Display class flags
1 parent 8d0772c commit e7a9d3d

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- [#346](https://github.com/clojure-emacs/orchard/pull/346): Inspector: only show those datafied collection items that have unique datafy represantation.
66
- [#348](https://github.com/clojure-emacs/orchard/pull/348): Inspector: display length of inspected strings.
7+
- [#348](https://github.com/clojure-emacs/orchard/pull/348): Inspector: display class flags.
78

89
## 0.35.0 (2025-05-28)
910

src/orchard/inspect.clj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,10 @@
955955
(-> inspector
956956
(render-labeled-value "Name" (-> obj .getName symbol))
957957
(render-class-name obj)
958+
(render "Flags: " (->> (.accessFlags obj)
959+
(map str/lower-case)
960+
(str/join " ")))
961+
(render-ln)
958962
(render-class-hierarchy obj)
959963
(render-class-section :Constructors (.getConstructors obj)
960964
(print-fn #(.toGenericString ^Constructor %)))

test/orchard/inspect_test.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,8 @@
931931
(testing "renders the header section"
932932
(is+ ["Name: "
933933
[:value "java.lang.Object" 0] [:newline]
934-
"Class: " [:value "java.lang.Class" 1] [:newline] [:newline]]
934+
"Class: " [:value "java.lang.Class" 1] [:newline]
935+
"Flags: public super" [:newline] [:newline]]
935936
(header rendered)))
936937
(testing "renders the constructors section"
937938
(is+ ["--- Constructors:"
@@ -997,7 +998,8 @@
997998
(testing "renders the header section"
998999
(is+ ["Name: "
9991000
[:value "java.lang.ClassValue" 0] [:newline]
1000-
"Class: " [:value "java.lang.Class" 1] [:newline] [:newline]]
1001+
"Class: " [:value "java.lang.Class" 1] [:newline]
1002+
"Flags: public super abstract" [:newline] [:newline]]
10011003
(header rendered)))
10021004
(testing "renders the methods section"
10031005
(let [methods (section rendered "Methods")]

0 commit comments

Comments
 (0)