ProcessingInstructionImpl.java
1.69 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.dom;
import com.adobe.xfa.Node;
import com.adobe.xfa.ProcessingInstruction;
import com.adobe.xfa.dom.ParentNode;
import com.adobe.xfa.dom.XFANodeHolder;
import com.adobe.xfa.ut.StringUtils;
import org.w3c.dom.DOMException;
class ProcessingInstructionImpl
extends XFANodeHolder
implements org.w3c.dom.ProcessingInstruction {
private final ProcessingInstruction mPI;
ProcessingInstructionImpl(ParentNode parent, ProcessingInstruction newPI) {
super(parent, newPI);
this.mPI = newPI;
}
@Override
public String getData() {
return this.mPI.getData();
}
@Override
public String getTarget() {
return this.mPI.getName();
}
@Override
public void setData(String data) throws DOMException {
throw new DOMException(7, "");
}
@Override
public String getNodeName() {
return this.mPI.getName();
}
@Override
public short getNodeType() {
return 7;
}
@Override
public String getNodeValue() throws DOMException {
return this.mPI.getData();
}
@Override
public String getTextContent() throws DOMException {
return this.mPI.getData();
}
@Override
public boolean isEqualNode(org.w3c.dom.Node other) {
if (this == other) {
return true;
}
if (!(other instanceof ProcessingInstructionImpl)) {
return false;
}
ProcessingInstructionImpl otherPI = (ProcessingInstructionImpl)other;
return StringUtils.equalsWithNull(this.mPI.getName(), otherPI.mPI.getName()) && StringUtils.equalsWithNull(this.mPI.getData(), otherPI.mPI.getData());
}
}