public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) { try { SchemaCompiler compiler = JAXBUtils.createSchemaCompiler(); Object allocator = ReflectionInvokationHandler .createProxyWrapper(new DefaultClassNameAllocator(allocatorSet), JAXBUtils.getParamClass(compiler, "setClassNameAllocator")); compiler.setClassNameAllocator(allocator); return compiler; } catch (JAXBException e1) { throw new IllegalStateException("Unable to create schema compiler", e1); } }
Object elForRun = ReflectionInvokationHandler .createProxyWrapper(listener, JAXBUtils.getParamClass(compiler, "setErrorListener"));
Object elForRun = ReflectionInvokationHandler .createProxyWrapper(listener, JAXBUtils.getParamClass(compiler, "setErrorListener"));
Object elForRun = ReflectionInvokationHandler .createProxyWrapper(listener, JAXBUtils.getParamClass(compiler, "setErrorListener"));
Object elForRun = ReflectionInvokationHandler .createProxyWrapper(listener, JAXBUtils.getParamClass(compiler, "setErrorListener"));
private JCodeModel createCodeModel(List<SchemaInfo> schemaElements, Set<String> type) { SchemaCompiler compiler = createCompiler(type); Object elForRun = ReflectionInvokationHandler .createProxyWrapper(new InnerErrorListener(), JAXBUtils.getParamClass(compiler, "setErrorListener")); compiler.setErrorListener(elForRun); compiler.setEntityResolver(OASISCatalogManager.getCatalogManager(bus) .getEntityResolver()); if (!compilerArgs.isEmpty()) { compiler.getOptions().addGrammar(new InputSource("null")); compiler.getOptions().parseArguments(compilerArgs.toArray(new String[0])); } addSchemas(schemaElements, compiler); for (InputSource is : bindingFiles) { compiler.getOptions().addBindFile(is); } S2JJAXBModel intermediateModel = compiler.bind(); JCodeModel codeModel = intermediateModel.generateCode(null, elForRun); JAXBUtils.logGeneratedClassNames(LOG, codeModel); return codeModel; }