use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class JaxbContextCreationTests method testCreateContextWith_TypeMappingInfoArray_Map_NullClassLoader.
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);
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class RootLevelByteArrayNullContentTestCases method getTypeMappingInfos.
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;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class JavaTypeAdapterStringToListTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[1];
TypeMappingInfo tmi = new TypeMappingInfo();
tmi.setXmlTagName(new QName("", "testTagname"));
tmi.setElementScope(ElementScope.Global);
tmi.setType(String.class);
Annotation[] annotations = getClass().getField("javaTypeAdapterField").getAnnotations();
tmi.setAnnotations(annotations);
typeMappingInfos[0] = tmi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class ListOfByteObjectArrayTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[1];
TypeMappingInfo tpi = new TypeMappingInfo();
tpi.setXmlTagName(new QName("", "testTagname"));
tpi.setElementScope(ElementScope.Global);
tpi.setType(getClass().getField("testField").getGenericType());
typeMappingInfos[0] = tpi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class ConflictingTypesTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[2];
TypeMappingInfo tmi = new TypeMappingInfo();
tmi.setXmlTagName(new QName("someUri", "testTagName1"));
tmi.setElementScope(ElementScope.Global);
tmi.setType(getClass().getField("testField").getGenericType());
typeMappingInfos[0] = tmi;
TypeMappingInfo tmi2 = new TypeMappingInfo();
tmi2.setXmlTagName(new QName("someUri", "testTagName2"));
tmi2.setElementScope(ElementScope.Global);
tmi2.setType(getClass().getField("testField").getGenericType());
typeMappingInfos[1] = tmi2;
}
return typeMappingInfos;
}
Aggregations