public void testCreateContextWith_TypeMappingInfoArray_Map_NullClassLoader() throws JAXBException { TypeMappingInfo[] typeMappingInfos = new TypeMappingInfo[1]; TypeMappingInfo listTMI = new TypeMappingInfo(); listTMI.setType(List.class); listTMI.setXmlTagName(new QName("urn:example", "my-list")); typeMappingInfos[0] = listTMI; JAXBContextFactory.createContext(typeMappingInfos, null, null); }
public XJCJavaModelInputImpl(TypeMappingInfo[] types, JavaModel javaModel) { this.jModel = javaModel; this.jClasses = new JavaClass[types.length]; for (int i = 0; i < types.length; i++) { TypeMappingInfo typeMappingInfo = types[i]; Type type = typeMappingInfo.getType(); jClasses[i] = jModel.getClass((Class<?>) type); } }
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception { if (typeMappingInfos == null) { typeMappingInfos = new TypeMappingInfo[1]; TypeMappingInfo tmi = new TypeMappingInfo(); tmi.setXmlTagName(new QName("someUri", "testTagName")); tmi.setElementScope(ElementScope.Global); tmi.setNillable(true); tmi.setType(Employee.class); typeMappingInfos[0] = tmi; } return typeMappingInfos; }
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception { if (typeMappingInfos == null) { typeMappingInfos = new TypeMappingInfo[1]; TypeMappingInfo tpi = new TypeMappingInfo(); tpi.setXmlTagName(new QName("someUri", "testTagname")); tpi.setElementScope(ElementScope.Global); tpi.setType(byte[].class); typeMappingInfos[0] = tpi; } return typeMappingInfos; }