equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, 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 |
25 |
25 |
26 package com.sun.xml.internal.ws.api.server; |
26 package com.sun.xml.internal.ws.api.server; |
27 |
27 |
28 import java.util.Collection; |
28 import java.util.Collection; |
29 import java.util.Collections; |
29 import java.util.Collections; |
30 import java.util.HashSet; |
|
31 import java.util.Set; |
30 import java.util.Set; |
32 import java.util.concurrent.CopyOnWriteArraySet; |
31 import java.util.concurrent.CopyOnWriteArraySet; |
33 |
32 |
34 import com.sun.istack.internal.NotNull; |
33 import com.sun.istack.internal.NotNull; |
35 import com.sun.xml.internal.ws.api.Component; |
34 import com.sun.xml.internal.ws.api.Component; |
89 |
88 |
90 private static final class NoneContainer extends Container { |
89 private static final class NoneContainer extends Container { |
91 } |
90 } |
92 |
91 |
93 public <S> S getSPI(Class<S> spiType) { |
92 public <S> S getSPI(Class<S> spiType) { |
|
93 if (components == null) return null; |
94 for (Component c : components) { |
94 for (Component c : components) { |
95 S s = c.getSPI(spiType); |
95 S s = c.getSPI(spiType); |
96 if (s != null) |
96 if (s != null) |
97 return s; |
97 return s; |
98 } |
98 } |