P15GEN2\59518
2025-10-10 9f6890646993d16260d4201d613c092132856127
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package foundation.handler;
 
import foundation.json.IJSONWriter;
import foundation.util.Util;
 
public class MethodMeta {
 
    private String id;
    private String name;
    private String title;
    private String methodName;
    private String providerName;
    private double transactionScore;
    private String operatorCode;
    private String param;
    
    public MethodMeta() {
        
    }
 
    public MethodMeta(String providerName, String simpleProviderName, String methodName) {
        this.id = providerName + "-" + methodName;
        this.name = simpleProviderName + "-" + methodName;
        this.providerName = providerName;
        this.methodName = methodName;
        
        this.title = "";
        transactionScore = 0;
        
        parseMethodName(methodName);            
        operatorCode = methodName; 
    }
 
    private void parseMethodName(String value) {
        if (Util.isEmpty(value)) {
            methodName = value;
        }
        
        methodName = methodName.trim().replace("(", "(").replace(")", ")");
        int pos = value.indexOf("(");
        
        if (pos <= 0) {
            methodName = value;
            return;
        }
        
        methodName = value.substring(0, pos);
        param = value.substring(pos + 1, value.length() - 1);
        param = param.trim();
    }
 
    public String getId() {
        return id;
    }
 
    public String getName() {
        return name;
    }
 
    public String getTitle() {
        return title;
    }
 
    public String getMethodName() {
        return methodName;
    }
 
    public String getProviderName() {
        return providerName;
    }
 
    public double getTransactionScore() {
        return transactionScore;
    }
 
    @Override
    public String toString() {
        return providerName + "." + methodName;
    }
 
    public void writeJSONBody(IJSONWriter writer) {
        writer.write("id", id);
        writer.write("name", name);
        writer.write("title", title);
        writer.write("method_name", methodName);
        writer.write("provider_name", providerName);
        writer.write("transactionScore", transactionScore);
    }
}