< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/ParameterImpl.java

Print this page


   1 /*
   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.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  84         return parent.owner;
  85     }
  86 
  87     public JavaMethod getParent() {
  88         return parent;
  89     }
  90 
  91     /**
  92      * @return Returns the name.
  93      */
  94     public QName getName() {
  95         return name;
  96     }
  97 
  98     public XMLBridge getXMLBridge() {
  99         return getOwner().getXMLBridge(typeInfo);
 100     }
 101 
 102     public XMLBridge getInlinedRepeatedElementBridge() {
 103         TypeInfo itemType = getItemType();
 104         if (itemType != null) {
 105             XMLBridge xb = getOwner().getXMLBridge(itemType);
 106             if (xb != null) return new RepeatedElementBridge(typeInfo, xb);
 107         }
 108         return null;
 109     }
 110 
 111     public TypeInfo getItemType() {
 112         if (itemTypeInfo != null) return itemTypeInfo;
 113         //RpcLit cannot inline repeated element in wrapper
 114         if (parent.getBinding().isRpcLit() || wrapper == null) return null;
 115         //InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class)
 116         if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null;
 117         if (!getBinding().isBody()) return null;
 118         itemTypeInfo = typeInfo.getItemType();
 119         return  itemTypeInfo;
 120     }
 121 
 122     /**  @deprecated  */
 123     public Bridge getBridge() {
 124         return getOwner().getBridge(typeReference);


 238      * @return the holder value if applicable.
 239      */
 240     public Object getHolderValue(Object obj) {
 241         if (obj != null && obj instanceof Holder)
 242             return ((Holder) obj).value;
 243         return obj;
 244     }
 245 
 246     public String getPartName() {
 247         if(partName == null)
 248             return name.getLocalPart();
 249         return partName;
 250     }
 251 
 252     public void setPartName(String partName) {
 253         this.partName = partName;
 254     }
 255 
 256     void fillTypes(List<TypeInfo> types) {
 257         TypeInfo itemType = getItemType();
 258         types.add((itemType != null) ? itemType : getTypeInfo());





 259     }
 260 }
   1 /*
   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.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  84         return parent.owner;
  85     }
  86 
  87     public JavaMethod getParent() {
  88         return parent;
  89     }
  90 
  91     /**
  92      * @return Returns the name.
  93      */
  94     public QName getName() {
  95         return name;
  96     }
  97 
  98     public XMLBridge getXMLBridge() {
  99         return getOwner().getXMLBridge(typeInfo);
 100     }
 101 
 102     public XMLBridge getInlinedRepeatedElementBridge() {
 103         TypeInfo itemType = getItemType();
 104         if (itemType != null && itemType.getWrapperType() == null) {
 105             XMLBridge xb = getOwner().getXMLBridge(itemType);
 106             if (xb != null) return new RepeatedElementBridge(typeInfo, xb);
 107         }
 108         return null;
 109     }
 110 
 111     public TypeInfo getItemType() {
 112         if (itemTypeInfo != null) return itemTypeInfo;
 113         //RpcLit cannot inline repeated element in wrapper
 114         if (parent.getBinding().isRpcLit() || wrapper == null) return null;
 115         //InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class)
 116         if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null;
 117         if (!getBinding().isBody()) return null;
 118         itemTypeInfo = typeInfo.getItemType();
 119         return  itemTypeInfo;
 120     }
 121 
 122     /**  @deprecated  */
 123     public Bridge getBridge() {
 124         return getOwner().getBridge(typeReference);


 238      * @return the holder value if applicable.
 239      */
 240     public Object getHolderValue(Object obj) {
 241         if (obj != null && obj instanceof Holder)
 242             return ((Holder) obj).value;
 243         return obj;
 244     }
 245 
 246     public String getPartName() {
 247         if(partName == null)
 248             return name.getLocalPart();
 249         return partName;
 250     }
 251 
 252     public void setPartName(String partName) {
 253         this.partName = partName;
 254     }
 255 
 256     void fillTypes(List<TypeInfo> types) {
 257         TypeInfo itemType = getItemType();
 258         if (itemType != null) {
 259             types.add(itemType);
 260             if (itemType.getWrapperType() != null) types.add(getTypeInfo());
 261         } else {
 262             types.add(getTypeInfo());
 263         }
 264     }
 265 }
< prev index next >