当前位置: 首页>>代码示例>>Java>>正文


Java AutoBeanFactory类代码示例

本文整理汇总了Java中com.google.web.bindery.autobean.shared.AutoBeanFactory的典型用法代码示例。如果您正苦于以下问题:Java AutoBeanFactory类的具体用法?Java AutoBeanFactory怎么用?Java AutoBeanFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AutoBeanFactory类属于com.google.web.bindery.autobean.shared包,在下文中一共展示了AutoBeanFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSourceWriter

import com.google.web.bindery.autobean.shared.AutoBeanFactory; //导入依赖的package包/类
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);
}
 
开发者ID:reinert,项目名称:requestor,代码行数:49,代码来源:JsonAutoBeanGenerator.java

示例2: getAutoBeanFactory

import com.google.web.bindery.autobean.shared.AutoBeanFactory; //导入依赖的package包/类
/**
 * Returns an AutoBeanFactory that can produce the types reachable only from this RequestContext.
 */
protected abstract AutoBeanFactory getAutoBeanFactory();
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:5,代码来源:AbstractRequestContext.java

示例3: XmlReader

import com.google.web.bindery.autobean.shared.AutoBeanFactory; //导入依赖的package包/类
/**
 * Creates a new XML reader that can turn XML into an AutoBean.
 * 
 * @param factory an auto bean factory capable of encoding objects of type M
 * @param rootBeanType AutoBean based type to represent the base data
 */
public XmlReader(AutoBeanFactory factory, Class<Base> rootBeanType) {
  super(factory, rootBeanType);
}
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:10,代码来源:XmlReader.java


注:本文中的com.google.web.bindery.autobean.shared.AutoBeanFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。