01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the License). You may not use this file except in
05: * compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
09: * See the License for the specific language governing
10: * permissions and limitations under the License.
11: *
12: * When distributing Covered Code, include this CDDL
13: * Header Notice in each file and include the License file
14: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
15: * If applicable, add the following below the CDDL Header,
16: * with the fields enclosed by brackets [] replaced by
17: * you own identifying information:
18: * "Portions Copyrighted [year] [name of copyright owner]"
19: *
20: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
21: */
22:
23: /*
24: * JAXBStructure.java
25: *
26: * Created on February 6, 2006, 5:01 PM
27: *
28: * To change this template, choose Tools | Template Manager
29: * and open the template in the editor.
30: */
31:
32: package com.sun.xml.ws.security.opt.crypto.jaxb;
33:
34: import javax.xml.bind.JAXBElement;
35:
36: /**
37: *
38: * @author Abhijit Das
39: */
40: public class JAXBStructure implements javax.xml.crypto.XMLStructure {
41:
42: private final JAXBElement jbElement;
43:
44: /** Creates a new instance of JAXBStructure */
45: public JAXBStructure(JAXBElement jbElement) {
46: if (jbElement == null)
47: throw new NullPointerException("JAXBElement cannot be null");
48: this .jbElement = jbElement;
49: }
50:
51: /**
52: * Returns the JAXBElement contained in this <code>JAXBStructure</code>.
53: *
54: * @return the JAXBElement
55: */
56: public JAXBElement getJAXBElement() {
57: return jbElement;
58: }
59:
60: /**
61: * @throws NullPointerException {@inheritDoc}
62: */
63: public boolean isFeatureSupported(String feature) {
64: if (feature == null) {
65: throw new NullPointerException();
66: } else {
67: return false;
68: }
69: }
70:
71: }
|