ExFull.java
3.57 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.ut;
import com.adobe.xfa.ut.*;
import java.util.ArrayList;
import java.util.List;
public class ExFull
extends ExceptionBase {
private static final long serialVersionUID = -2764654020640603225L;
private final List<ExErrItem> moItems = new ArrayList<ExErrItem>();
public ExFull() {
}
public ExFull(Exception e) {
this.moItems.add(new ExErrItem(ResId.SOFTWARE_FAILURE, e.getMessage()));
}
public ExFull(int nResId) {
this.moItems.add(new ExErrItem(nResId));
}
ExFull(int nResId, boolean bWasReported) {
super(bWasReported);
this.moItems.add(new ExErrItem(nResId));
}
ExFull(int nResId, MsgFormatPos oFormat, boolean bWasReported) {
super(bWasReported);
MsgFormatPos oFmt = new MsgFormatPos(oFormat);
ExErrItem oItem = new ExErrItem();
String sFmt = oFmt.toString();
oItem.text(sFmt);
oItem.resId(nResId);
oItem.formatObject(oFormat);
this.moItems.add(oItem);
}
public ExFull(int nResId, String p1) {
MsgFormatPos msg = new MsgFormatPos(nResId, p1);
ExErrItem oItem = new ExErrItem();
String sFmt = msg.toString();
oItem.text(sFmt);
oItem.resId(nResId);
oItem.formatObject(msg);
this.moItems.add(oItem);
}
public ExFull(String text, int resId) {
ExErrItem oItem = new ExErrItem();
oItem.text(text);
oItem.resId(resId);
this.moItems.add(oItem);
}
public ExFull(MsgFormat oFormat) {
ExErrItem oItem = new ExErrItem();
oItem.text(oFormat.toString());
oItem.resId(oFormat.resId());
oItem.formatObject(oFormat);
this.moItems.add(oItem);
}
public ExFull(MsgFormatPos oFormat) {
ExErrItem oItem = new ExErrItem();
oItem.text(oFormat.toString());
oItem.resId(oFormat.resId());
oItem.formatObject(oFormat);
this.moItems.add(oItem);
}
@Override
public int count() {
return this.moItems.size();
}
public int firstResId() {
if (this.moItems.size() > 0) {
return this.moItems.get(0).resId();
}
return 0;
}
public int getResId(int n) {
if (n > this.count() - 1 || this.moItems.size() < 1) {
return 0;
}
return this.moItems.get(n).resId();
}
public boolean hasResId(int nResId) {
for (int i = 0; i < this.moItems.size(); ++i) {
if (this.moItems.get(i).resId() != nResId) continue;
return true;
}
return false;
}
public void insert(ExFull source, boolean bAppend) {
for (int i = 0; i < source.moItems.size(); ++i) {
if (bAppend) {
this.moItems.add(source.moItems.get(i));
continue;
}
this.moItems.add(0, source.moItems.get(i));
}
}
@Override
public ExErrItem item(int n) {
return this.moItems.get(n);
}
@Override
public void resolve() {
for (int i = 0; i < this.moItems.size(); ++i) {
this.moItems.get(i).resolve();
}
}
@Override
public String toString() {
if (this.moItems.size() == 0) {
return "";
}
this.resolve();
StringBuilder sReturn = new StringBuilder();
int n = this.moItems.size();
for (int i = 0; i < n; ++i) {
sReturn.append(this.moItems.get(i).text());
sReturn.append('\n');
}
return sReturn.toString();
}
}