com.sun.xml.internal.ws.spi.db.TypeInfo Java Examples
The following examples show how to use
com.sun.xml.internal.ws.spi.db.TypeInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JAXBRIContextFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public BindingContext newContext(BindingInfo bi) { Class[] classes = bi.contentClasses().toArray(new Class[bi.contentClasses().size()]); for (int i = 0; i < classes.length; i++) { if (WrapperComposite.class.equals(classes[i])) { classes[i] = CompositeStructure.class; } } Map<TypeInfo, TypeReference> typeInfoMappings = typeInfoMappings(bi.typeInfos()); Map<Class, Class> subclassReplacements = bi.subclassReplacements(); String defaultNamespaceRemap = bi.getDefaultNamespace(); Boolean c14nSupport = (Boolean) bi.properties().get("c14nSupport"); RuntimeAnnotationReader ar = (RuntimeAnnotationReader) bi.properties().get("com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader"); JAXBContextFactory jaxbContextFactory = (JAXBContextFactory) bi.properties().get(JAXBContextFactory.class.getName()); try { JAXBRIContext context = (jaxbContextFactory != null) ? jaxbContextFactory.createJAXBContext( bi.getSEIModel(), toList(classes), toList(typeInfoMappings.values())) : ContextFactory.createContext( classes, typeInfoMappings.values(), subclassReplacements, defaultNamespaceRemap, (c14nSupport != null) ? c14nSupport : false, ar, false, false, false); return new JAXBRIContextWrapper(context, typeInfoMappings); } catch (Exception e) { throw new DatabindingException(e); } }
Example #2
Source File: JAXBRIContextWrapper.java From hottub with GNU General Public License v2.0 | 5 votes |
JAXBRIContextWrapper(JAXBRIContext cxt, Map<TypeInfo, TypeReference> refs) { context = cxt; typeRefs = refs; if (refs != null) { typeInfos = new java.util.HashMap<TypeReference, TypeInfo>(); for (TypeInfo ti : refs.keySet()) { typeInfos.put(typeRefs.get(ti), ti); } } }
Example #3
Source File: JAXBRIContextFactory.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override public BindingContext newContext(BindingInfo bi) { Class[] classes = bi.contentClasses().toArray(new Class[bi.contentClasses().size()]); for (int i = 0; i < classes.length; i++) { if (WrapperComposite.class.equals(classes[i])) { classes[i] = CompositeStructure.class; } } Map<TypeInfo, TypeReference> typeInfoMappings = typeInfoMappings(bi.typeInfos()); Map<Class, Class> subclassReplacements = bi.subclassReplacements(); String defaultNamespaceRemap = bi.getDefaultNamespace(); Boolean c14nSupport = (Boolean) bi.properties().get("c14nSupport"); RuntimeAnnotationReader ar = (RuntimeAnnotationReader) bi.properties().get("com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader"); JAXBContextFactory jaxbContextFactory = (JAXBContextFactory) bi.properties().get(JAXBContextFactory.class.getName()); try { JAXBRIContext context = (jaxbContextFactory != null) ? jaxbContextFactory.createJAXBContext( bi.getSEIModel(), toList(classes), toList(typeInfoMappings.values())) : ContextFactory.createContext( classes, typeInfoMappings.values(), subclassReplacements, defaultNamespaceRemap, (c14nSupport != null) ? c14nSupport : false, ar, false, false, false); return new JAXBRIContextWrapper(context, typeInfoMappings); } catch (Exception e) { throw new DatabindingException(e); } }
Example #4
Source File: ParameterImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public ParameterImpl(JavaMethodImpl parent, TypeInfo type, Mode mode, int index) { assert type != null; this.typeInfo = type; this.name = type.tagName; this.mode = mode; this.index = index; this.parent = parent; }
Example #5
Source File: WrapperParameter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override void fillTypes(List<TypeInfo> types) { super.fillTypes(types); if(WrapperComposite.class.equals(getTypeInfo().type)) { for (ParameterImpl p : wrapperChildren) p.fillTypes(types); } // if(getParent().getBinding().isRpcLit()) { // // for rpc/lit, we need to individually marshal/unmarshal wrapped values, // // so their TypeReference needs to be collected //// assert getTypeReference().type==CompositeStructure.class; // for (ParameterImpl p : wrapperChildren) // p.fillTypes(types); // } }
Example #6
Source File: ParameterImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public XMLBridge getInlinedRepeatedElementBridge() { TypeInfo itemType = getItemType(); if (itemType != null) { XMLBridge xb = getOwner().getXMLBridge(itemType); if (xb != null) return new RepeatedElementBridge(typeInfo, xb); } return null; }
Example #7
Source File: JavaMethodImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
final void fillTypes(List<TypeInfo> types) { fillTypes(requestParams, types); fillTypes(responseParams, types); for (CheckedExceptionImpl ce : exceptions) { types.add(ce.getDetailType()); } }
Example #8
Source File: JAXBRIContextFactory.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private Map<TypeInfo, TypeReference> typeInfoMappings(Collection<TypeInfo> typeInfos) { Map<TypeInfo, TypeReference> map = new java.util.HashMap<TypeInfo, TypeReference>(); for (TypeInfo ti : typeInfos) { Type type = WrapperComposite.class.equals(ti.type) ? CompositeStructure.class : ti.type; TypeReference tr = new TypeReference(ti.tagName, type, ti.annotations); map.put(ti, tr); } return map; }
Example #9
Source File: ParameterImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public TypeInfo getItemType() { if (itemTypeInfo != null) return itemTypeInfo; //RpcLit cannot inline repeated element in wrapper if (parent.getBinding().isRpcLit() || wrapper == null) return null; //InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class) if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null; if (!getBinding().isBody()) return null; itemTypeInfo = typeInfo.getItemType(); return itemTypeInfo; }
Example #10
Source File: WrapperParameter.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override void fillTypes(List<TypeInfo> types) { super.fillTypes(types); if(WrapperComposite.class.equals(getTypeInfo().type)) { for (ParameterImpl p : wrapperChildren) p.fillTypes(types); } // if(getParent().getBinding().isRpcLit()) { // // for rpc/lit, we need to individually marshal/unmarshal wrapped values, // // so their TypeReference needs to be collected //// assert getTypeReference().type==CompositeStructure.class; // for (ParameterImpl p : wrapperChildren) // p.fillTypes(types); // } }
Example #11
Source File: JavaMethodImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
final void fillTypes(List<TypeInfo> types) { fillTypes(requestParams, types); fillTypes(responseParams, types); for (CheckedExceptionImpl ce : exceptions) { types.add(ce.getDetailType()); } }
Example #12
Source File: ParameterImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
public XMLBridge getInlinedRepeatedElementBridge() { TypeInfo itemType = getItemType(); if (itemType != null) { XMLBridge xb = getOwner().getXMLBridge(itemType); if (xb != null) return new RepeatedElementBridge(typeInfo, xb); } return null; }
Example #13
Source File: ParameterImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public XMLBridge getInlinedRepeatedElementBridge() { TypeInfo itemType = getItemType(); if (itemType != null && itemType.getWrapperType() == null) { XMLBridge xb = getOwner().getXMLBridge(itemType); if (xb != null) return new RepeatedElementBridge(typeInfo, xb); } return null; }
Example #14
Source File: JAXBRIContextWrapper.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
JAXBRIContextWrapper(JAXBRIContext cxt, Map<TypeInfo, TypeReference> refs) { context = cxt; typeRefs = refs; if (refs != null) { typeInfos = new java.util.HashMap<TypeReference, TypeInfo>(); for (TypeInfo ti : refs.keySet()) { typeInfos.put(typeRefs.get(ti), ti); } } }
Example #15
Source File: ParameterImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
void fillTypes(List<TypeInfo> types) { TypeInfo itemType = getItemType(); if (itemType != null) { types.add(itemType); if (itemType.getWrapperType() != null) types.add(getTypeInfo()); } else { types.add(getTypeInfo()); } }
Example #16
Source File: ParameterImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public TypeInfo getItemType() { if (itemTypeInfo != null) return itemTypeInfo; //RpcLit cannot inline repeated element in wrapper if (parent.getBinding().isRpcLit() || wrapper == null) return null; //InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class) if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null; if (!getBinding().isBody()) return null; itemTypeInfo = typeInfo.getItemType(); return itemTypeInfo; }
Example #17
Source File: JAXBRIContextWrapper.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
JAXBRIContextWrapper(JAXBRIContext cxt, Map<TypeInfo, TypeReference> refs) { context = cxt; typeRefs = refs; if (refs != null) { typeInfos = new java.util.HashMap<TypeReference, TypeInfo>(); for (TypeInfo ti : refs.keySet()) { typeInfos.put(typeRefs.get(ti), ti); } } }
Example #18
Source File: JavaMethodImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
final void fillTypes(List<TypeInfo> types) { fillTypes(requestParams, types); fillTypes(responseParams, types); for (CheckedExceptionImpl ce : exceptions) { types.add(ce.getDetailType()); } }
Example #19
Source File: JavaMethodImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * @deprecated * @param detailType * @return Gets the CheckedException corresponding to detailType. Returns * null if no CheckedExcpetion with the detailType found. */ public CheckedExceptionImpl getCheckedException(TypeReference detailType) { for (CheckedExceptionImpl ce : exceptions) { TypeInfo actual = ce.getDetailType(); if (actual.tagName.equals(detailType.tagName) && actual.type==detailType.type) { return ce; } } return null; }
Example #20
Source File: JAXBRIContextWrapper.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public XMLBridge createBridge(TypeInfo ti) { TypeReference tr = typeRefs.get(ti); com.sun.xml.internal.bind.api.Bridge b = context.createBridge(tr); return WrapperComposite.class.equals(ti.type) ? new WrapperBridge(this, b) : new BridgeWrapper(this, b); }
Example #21
Source File: JavaMethodImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * @deprecated * @param detailType * @return Gets the CheckedException corresponding to detailType. Returns * null if no CheckedExcpetion with the detailType found. */ public CheckedExceptionImpl getCheckedException(TypeReference detailType) { for (CheckedExceptionImpl ce : exceptions) { TypeInfo actual = ce.getDetailType(); if (actual.tagName.equals(detailType.tagName) && actual.type==detailType.type) { return ce; } } return null; }
Example #22
Source File: JAXBRIContextWrapper.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public XMLBridge createBridge(TypeInfo ti) { TypeReference tr = typeRefs.get(ti); com.sun.xml.internal.bind.api.Bridge b = context.createBridge(tr); return WrapperComposite.class.equals(ti.type) ? new WrapperBridge(this, b) : new BridgeWrapper(this, b); }
Example #23
Source File: ParameterImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public XMLBridge getInlinedRepeatedElementBridge() { TypeInfo itemType = getItemType(); if (itemType != null) { XMLBridge xb = getOwner().getXMLBridge(itemType); if (xb != null) return new RepeatedElementBridge(typeInfo, xb); } return null; }
Example #24
Source File: JAXBRIContextWrapper.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override public XMLBridge createBridge(TypeInfo ti) { TypeReference tr = typeRefs.get(ti); com.sun.xml.internal.bind.api.Bridge b = context.createBridge(tr); return WrapperComposite.class.equals(ti.type) ? new WrapperBridge(this, b) : new BridgeWrapper(this, b); }
Example #25
Source File: AbstractSEIModelImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * @return returns non-null list of TypeReference */ private List<TypeInfo> getAllTypeInfos() { List<TypeInfo> types = new ArrayList<TypeInfo>(); Collection<JavaMethodImpl> methods = methodToJM.values(); for (JavaMethodImpl m : methods) { m.fillTypes(types); } return types; }
Example #26
Source File: ParameterImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public TypeInfo getItemType() { if (itemTypeInfo != null) return itemTypeInfo; //RpcLit cannot inline repeated element in wrapper if (parent.getBinding().isRpcLit() || wrapper == null) return null; //InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class) if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null; if (!getBinding().isBody()) return null; itemTypeInfo = typeInfo.getItemType(); return itemTypeInfo; }
Example #27
Source File: JAXBRIContextFactory.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private Map<TypeInfo, TypeReference> typeInfoMappings(Collection<TypeInfo> typeInfos) { Map<TypeInfo, TypeReference> map = new java.util.HashMap<TypeInfo, TypeReference>(); for (TypeInfo ti : typeInfos) { Type type = WrapperComposite.class.equals(ti.type) ? CompositeStructure.class : ti.type; TypeReference tr = new TypeReference(ti.tagName, type, ti.annotations); map.put(ti, tr); } return map; }
Example #28
Source File: AbstractSEIModelImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * @return returns non-null list of TypeReference */ private List<TypeInfo> getAllTypeInfos() { List<TypeInfo> types = new ArrayList<TypeInfo>(); Collection<JavaMethodImpl> methods = methodToJM.values(); for (JavaMethodImpl m : methods) { m.fillTypes(types); } return types; }
Example #29
Source File: JavaMethodImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * @deprecated * @param detailType * @return Gets the CheckedException corresponding to detailType. Returns * null if no CheckedExcpetion with the detailType found. */ public CheckedExceptionImpl getCheckedException(TypeReference detailType) { for (CheckedExceptionImpl ce : exceptions) { TypeInfo actual = ce.getDetailType(); if (actual.tagName.equals(detailType.tagName) && actual.type==detailType.type) { return ce; } } return null; }
Example #30
Source File: JAXBRIContextFactory.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private Map<TypeInfo, TypeReference> typeInfoMappings(Collection<TypeInfo> typeInfos) { Map<TypeInfo, TypeReference> map = new java.util.HashMap<TypeInfo, TypeReference>(); for (TypeInfo ti : typeInfos) { Type type = WrapperComposite.class.equals(ti.type) ? CompositeStructure.class : ti.type; TypeReference tr = new TypeReference(ti.tagName, type, ti.annotations); map.put(ti, tr); } return map; }