Skip to content

Package: FaultElement1_1Impl

FaultElement1_1Impl

nameinstructionbranchcomplexitylinemethod
FaultElement1_1Impl(SOAPDocumentImpl, NameImpl)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
FaultElement1_1Impl(SOAPDocumentImpl, QName)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
FaultElement1_1Impl(SOAPDocumentImpl, String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
FaultElement1_1Impl(SOAPDocumentImpl, String, String)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
isStandardFaultElement()
M: 6 C: 14
70%
M: 3 C: 3
50%
M: 2 C: 2
50%
M: 2 C: 4
67%
M: 0 C: 1
100%
setElementQName(QName)
M: 20 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Distribution License v. 1.0, which is available at
6: * http://www.eclipse.org/org/documents/edl-v10.php.
7: *
8: * SPDX-License-Identifier: BSD-3-Clause
9: */
10:
11: package com.sun.xml.messaging.saaj.soap.ver1_1;
12:
13: import javax.xml.namespace.QName;
14: import jakarta.xml.soap.SOAPElement;
15: import jakarta.xml.soap.SOAPException;
16:
17: import com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl;
18: import com.sun.xml.messaging.saaj.soap.impl.FaultElementImpl;
19: import com.sun.xml.messaging.saaj.soap.name.NameImpl;
20:
21: /**
22: *
23: * @author SAAJ RI Development Team
24: */
25: public class FaultElement1_1Impl extends FaultElementImpl {
26:
27: public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
28: super(ownerDoc, qname);
29: }
30:
31: public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
32: super(ownerDoc, qname);
33: }
34:
35: public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc,
36: String localName) {
37: super(ownerDoc, NameImpl.createFaultElement1_1Name(localName));
38: }
39:
40: public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc,
41: String localName,
42: String prefix) {
43: super(ownerDoc,
44: NameImpl.createFaultElement1_1Name(localName, prefix));
45: }
46:
47: @Override
48: protected boolean isStandardFaultElement() {
49: String localName = elementQName.getLocalPart();
50:• if (localName.equalsIgnoreCase("faultcode") ||
51:• localName.equalsIgnoreCase("faultstring") ||
52:• localName.equalsIgnoreCase("faultactor")) {
53: return true;
54: }
55: return false;
56: }
57:
58: @Override
59: public SOAPElement setElementQName(QName newName) throws SOAPException {
60:• if (!isStandardFaultElement()) {
61: FaultElement1_1Impl copy =
62: new FaultElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
63: return replaceElementWithSOAPElement(this,copy);
64: } else {
65: return super.setElementQName(newName);
66: }
67: }
68: }