src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
24 */ 24 */
25 25
26 package com.sun.tools.internal.ws.processor.model; 26 package com.sun.tools.internal.ws.processor.model;
27 27
28 import com.sun.codemodel.internal.JClass; 28 import com.sun.codemodel.internal.JClass;
29 import com.sun.tools.internal.ws.processor.generator.GeneratorUtil;
30 import com.sun.tools.internal.ws.processor.model.java.JavaException; 29 import com.sun.tools.internal.ws.processor.model.java.JavaException;
31 import com.sun.tools.internal.ws.wsdl.framework.Entity; 30 import com.sun.tools.internal.ws.wsdl.framework.Entity;
32 31
33 import javax.xml.namespace.QName; 32 import javax.xml.namespace.QName;
34 import java.util.HashSet; 33 import java.util.HashSet;
35 import java.util.Iterator; 34 import java.util.Iterator;
36 import java.util.Set; 35 import java.util.Set;
37 import java.util.TreeSet;
38 36
39 /** 37 /**
40 * 38 *
41 * @author WS Development Team 39 * @author WS Development Team
42 */ 40 */
47 } 45 }
48 46
49 public Fault(String name, Entity entity) { 47 public Fault(String name, Entity entity) {
50 super(entity); 48 super(entity);
51 this.name = name; 49 this.name = name;
52 parentFault = null;
53 } 50 }
54 51
55 public String getName() { 52 public String getName() {
56 return name; 53 return name;
57 } 54 }
78 75
79 public void accept(ModelVisitor visitor) throws Exception { 76 public void accept(ModelVisitor visitor) throws Exception {
80 visitor.visit(this); 77 visitor.visit(this);
81 } 78 }
82 79
83 public Fault getParentFault() {
84 return parentFault;
85 }
86
87 public Iterator getSubfaults() { 80 public Iterator getSubfaults() {
88 if (subfaults.size() == 0) { 81 if (subfaults.isEmpty()) {
89 return null; 82 return null;
90 } 83 }
91 return subfaults.iterator(); 84 return subfaults.iterator();
92 } 85 }
93 86
101 subfaults = s; 94 subfaults = s;
102 } 95 }
103 96
104 public Iterator getAllFaults() { 97 public Iterator getAllFaults() {
105 Set allFaults = getAllFaultsSet(); 98 Set allFaults = getAllFaultsSet();
106 if (allFaults.size() == 0) { 99 if (allFaults.isEmpty()) {
107 return null; 100 return null;
108 } 101 }
109 return allFaults.iterator(); 102 return allFaults.iterator();
110 } 103 }
111 104
158 151
159 private boolean wsdlException = true; 152 private boolean wsdlException = true;
160 private String name; 153 private String name;
161 private Block block; 154 private Block block;
162 private JavaException javaException; 155 private JavaException javaException;
163 private Fault parentFault;
164 private Set subfaults = new HashSet(); 156 private Set subfaults = new HashSet();
165 private QName elementName = null; 157 private QName elementName = null;
166 private String javaMemberName = null; 158 private String javaMemberName = null;
167 private JClass exceptionClass; 159 private JClass exceptionClass;
168 160

mercurial