File tree 6 files changed +47
-40
lines changed 6 files changed +47
-40
lines changed Original file line number Diff line number Diff line change
1
+ inspecting field value
2
+ @JsonProperty("REAL_VALUE")
3
+ inspecting method getValue
4
+ @JsonProperty("REAL_VALUE")
5
+ inspecting method setValue
6
+ inspecting method value
7
+ inspecting method value_$eq
8
+ inspecting constructor TestBeanProperty
Original file line number Diff line number Diff line change 1
1
inspecting field brandName
2
- @ MyColumnBase(name="BRAND_NAME")
2
+ interface MyColumnBase
3
3
inspecting field companyName
4
- @ MyColumnBase(name="COMPANY_NAME")
4
+ interface MyColumnBase
5
5
inspecting method brandName
6
6
inspecting method companyName
7
7
inspecting constructor MyTable
Original file line number Diff line number Diff line change @@ -8,29 +8,3 @@ class MyTable(
8
8
@ MyColumn (name= " COMPANY_NAME" )
9
9
val companyName : String ,
10
10
)
11
-
12
- object Test :
13
- def main (args : Array [String ]): Unit =
14
- val clasz = classOf [MyTable ]
15
-
16
- for (m <- clasz.getDeclaredFields.sortBy(_.getName)) {
17
- m.setAccessible(true )
18
- println(s " inspecting field ${m.getName}" )
19
- for a <- m.getAnnotations().sortBy(_.toString) do
20
- println(a)
21
- }
22
-
23
- for (m <- clasz.getDeclaredMethods.sortBy(_.getName)) {
24
- m.setAccessible(true )
25
- println(s " inspecting method ${m.getName}" )
26
- for a <- m.getAnnotations().sortBy(_.toString) do
27
- println(a)
28
- }
29
-
30
- for c <- clasz.getDeclaredConstructors.sortBy(_.getName) do
31
- c.setAccessible(true )
32
- println(s " inspecting constructor ${c.getName}" )
33
- for p <- c.getParameters.sortBy(_.getName) do
34
- println(s " inspecting param ${p.getName}" )
35
- for a <- p.getAnnotations.sortBy(_.toString) do
36
- println(s " annotation $a" )
Original file line number Diff line number Diff line change
1
+ object Test :
2
+ def main (args : Array [String ]): Unit =
3
+ val cls = classOf [MyTable ]
4
+
5
+ for (m <- cls.getDeclaredFields.sortBy(_.getName)) {
6
+ m.setAccessible(true )
7
+ println(s " inspecting field ${m.getName}" )
8
+ for a <- m.getAnnotations().sortBy(_.annotationType.toString) do
9
+ println(a.annotationType)
10
+ }
11
+
12
+ for (m <- cls.getDeclaredMethods.sortBy(_.getName)) {
13
+ m.setAccessible(true )
14
+ println(s " inspecting method ${m.getName}" )
15
+ for a <- m.getAnnotations().sortBy(_.annotationType.toString) do
16
+ println(a.annotationType)
17
+ }
18
+
19
+ for c <- cls.getDeclaredConstructors.sortBy(_.getName) do
20
+ c.setAccessible(true )
21
+ println(s " inspecting constructor ${c.getName}" )
22
+ for p <- c.getParameters.sortBy(_.getName) do
23
+ println(s " inspecting param ${p.getName}" )
24
+ for a <- p.getAnnotations.sortBy(_.annotationType.toString) do
25
+ println(a.annotationType)
Original file line number Diff line number Diff line change 1
1
inspecting field value
2
- @ JsonProperty(value="REAL_VALUE")
2
+ interface JsonProperty
3
3
inspecting method getValue
4
- @ JsonProperty(value="REAL_VALUE")
4
+ interface JsonProperty
5
5
inspecting method setValue
6
6
inspecting method value
7
7
inspecting method value_$eq
Original file line number Diff line number Diff line change 1
1
object Test :
2
2
def main (args : Array [String ]): Unit =
3
- val clasz = classOf [TestBeanProperty ]
3
+ val cls = classOf [TestBeanProperty ]
4
4
5
- for (m <- clasz .getDeclaredFields.sortBy(_.getName)) {
5
+ for (m <- cls .getDeclaredFields.sortBy(_.getName)) {
6
6
m.setAccessible(true )
7
7
println(s " inspecting field ${m.getName}" )
8
- for a <- m.getAnnotations().sortBy(_.toString) do
9
- println(a)
8
+ for a <- m.getAnnotations().sortBy(_.annotationType. toString) do
9
+ println(a.annotationType )
10
10
}
11
11
12
- for (m <- clasz .getDeclaredMethods.sortBy(_.getName)) {
12
+ for (m <- cls .getDeclaredMethods.sortBy(_.getName)) {
13
13
m.setAccessible(true )
14
14
println(s " inspecting method ${m.getName}" )
15
- for a <- m.getAnnotations().sortBy(_.toString) do
16
- println(a)
15
+ for a <- m.getAnnotations().sortBy(_.annotationType. toString) do
16
+ println(a.annotationType )
17
17
}
18
18
19
- for c <- clasz .getDeclaredConstructors.sortBy(_.getName) do
19
+ for c <- cls .getDeclaredConstructors.sortBy(_.getName) do
20
20
c.setAccessible(true )
21
21
println(s " inspecting constructor ${c.getName}" )
22
22
for p <- c.getParameters.sortBy(_.getName) do
23
23
println(s " inspecting param ${p.getName}" )
24
- for a <- p.getAnnotations.sortBy(_.toString) do
25
- println(s " annotation $a " )
24
+ for a <- p.getAnnotations.sortBy(_.annotationType. toString) do
25
+ println(a.annotationType )
You can’t perform that action at this time.
0 commit comments