1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.ep.db4o.javassist;
18
19 import javassist.CtClass;
20
21 import com.db4o.diagnostic.DiagnosticBase;
22
23 public class ClassWithFinalMethod extends DiagnosticBase {
24
25 private CtClass _class;
26 private String _method;
27
28 public ClassWithFinalMethod(CtClass class1, String method) {
29 _class = class1;
30 _method = method;
31 }
32
33 @Override
34 public String problem() {
35 return "An object of class "
36 + _class.getName()
37 + " was stored. The method '" + _method + "' is declared final and thus, cannot be enhanced and use transparent activation.";
38 }
39
40 @Override
41 public Object reason() {
42 return _class.getName();
43 }
44
45 @Override
46 public String solution() {
47 return "Remove modifier final on the method '"
48 + _method + "' of " + _class.getName()
49 + ".";
50 }
51 }