com.google.web.bindery.autobean.shared.AutoBeanFactory Java Examples
The following examples show how to use
com.google.web.bindery.autobean.shared.AutoBeanFactory.
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: JsonAutoBeanGenerator.java From requestor with Apache License 2.0 | 4 votes |
private SourceWriter getSourceWriter(TreeLogger logger, GeneratorContext ctx, JClassType intfType) { JPackage serviceIntfPkg = intfType.getPackage(); String packageName = serviceIntfPkg == null ? "" : serviceIntfPkg.getName(); PrintWriter printWriter = ctx.tryCreate(logger, packageName, getTypeSimpleName()); if (printWriter == null) { return null; } ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, getTypeSimpleName()); String[] imports = new String[]{ // java.util ArrayList.class.getCanonicalName(), Collection.class.getCanonicalName(), List.class.getCanonicalName(), Iterator.class.getCanonicalName(), Set.class.getCanonicalName(), // com.google.gwt.core.client GWT.class.getCanonicalName(), // com.google.web.bindery.autobean.shared AutoBean.class.getCanonicalName(), AutoBeanCodex.class.getCanonicalName(), AutoBeanFactory.class.getCanonicalName(), AutoBeanUtils.class.getCanonicalName(), // io.reinert.requestor.serialization DeserializationContext.class.getCanonicalName(), Deserializer.class.getCanonicalName(), HasImpl.class.getCanonicalName(), Serdes.class.getCanonicalName(), Serializer.class.getCanonicalName(), SerializationContext.class.getCanonicalName(), UnableToDeserializeException.class.getName(), UnableToSerializeException.class.getName(), // io.reinert.requestor.serialization.json JsonObjectSerdes.class.getCanonicalName(), JsonRecordReader.class.getCanonicalName(), JsonRecordWriter.class.getCanonicalName(), }; for (String imp : imports) { composerFactory.addImport(imp); } composerFactory.addImplementedInterface(intfType.getErasedType().getQualifiedSourceName()); return composerFactory.createSourceWriter(ctx, printWriter); }
Example #2
Source File: AutoBeanStub.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public AutoBeanFactory getFactory() { return null; }
Example #3
Source File: ConsoleFramework.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public AutoBeanFactory getBeanFactory() { return factory; }