-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathExternalMethodNotFoundWarning.java
More file actions
40 lines (32 loc) · 1.05 KB
/
ExternalMethodNotFoundWarning.java
File metadata and controls
40 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package liquidjava.diagnostics.warnings;
import spoon.reflect.declaration.CtElement;
/**
* Warning indicating that a method referenced in an external refinement was not found
*
* @see LJWarning
*/
public class ExternalMethodNotFoundWarning extends LJWarning {
private final String methodName;
private final String className;
private final String[] overloads;
public ExternalMethodNotFoundWarning(CtElement element, String message, String methodName, String className,
String[] overloads) {
super(message, element.getPosition());
this.methodName = methodName;
this.className = className;
this.overloads = overloads;
}
public String getMethodName() {
return methodName;
}
public String getClassName() {
return className;
}
public String[] getOverloads() {
return overloads;
}
@Override
public String getDetails() {
return overloads.length > 0 ? String.format("Available overloads:\n %s", String.join("\n ", overloads)) : "";
}
}