private static RuntimeTypeInfoSet create(Class... classes) throws Exception {
IllegalAnnotationsException.Builder errorListener = new IllegalAnnotationsException.Builder();
RuntimeInlineAnnotationReader reader = new RuntimeInlineAnnotationReader();
JAXBContextImpl context =
new JAXBContextImpl(classes, null, Collections.<Class, Class> emptyMap(), null, false, reader, false, false);
RuntimeModelBuilder builder =
new RuntimeModelBuilder(context, reader, Collections.<Class, Class> emptyMap(), null);
builder.setErrorHandler(errorListener);
for (Class c : classes)
builder.getTypeInfo(new Ref<Type, Class>(c));
RuntimeTypeInfoSet r = builder.link();
errorListener.check();
return r;
}