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


Java ProcessingEnvironment.getFiler方法代码示例

本文整理汇总了Java中javax.annotation.processing.ProcessingEnvironment.getFiler方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessingEnvironment.getFiler方法的具体用法?Java ProcessingEnvironment.getFiler怎么用?Java ProcessingEnvironment.getFiler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.annotation.processing.ProcessingEnvironment的用法示例。


在下文中一共展示了ProcessingEnvironment.getFiler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);

    routerNodes = new ArrayList<>();

    mFiler = processingEnv.getFiler();
    types = processingEnv.getTypeUtils();
    elements = processingEnv.getElementUtils();
    typeUtils = new TypeUtils(types, elements);

    type_String = elements.getTypeElement("java.lang.String").asType();

    logger = new Logger(processingEnv.getMessager());

    Map<String, String> options = processingEnv.getOptions();
    if (MapUtils.isNotEmpty(options)) {
        host = options.get(KEY_HOST_NAME);
        logger.info(">>> host is " + host + " <<<");
    }
    if (host == null || host.equals("")) {
        host = "default";
    }
    logger.info(">>> RouteProcessor init. <<<");
}
 
开发者ID:luojilab,项目名称:DDComponentForAndroid,代码行数:26,代码来源:RouterProcessor.java

示例2: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {

    super.init(processingEnvironment);
    filter = processingEnvironment.getFiler();
    messager = processingEnvironment.getMessager();
    printValue("MRoute init-->" + this);
    processingEnvironment.getOptions();
    Map<String, String> options = processingEnv.getOptions();
    if (options != null && !options.isEmpty()) {
        moduleName = options.get(KEY_MODULE_NAME);
        if (moduleName != null && moduleName.length() > 0) {
            moduleName = moduleName.replaceAll("[^0-9a-zA-Z_]+", "");
        }
        printValue("moduleName-->" + moduleName);
    }
}
 
开发者ID:chiclaim,项目名称:MRouter,代码行数:18,代码来源:RouteProcessor.java

示例3: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);

    final Types typeUtils = processingEnv.getTypeUtils();
    final Elements elementUtils = processingEnv.getElementUtils();
    final Filer filer = processingEnv.getFiler();
    final Messager messager = processingEnv.getMessager();

    this.processorUtil = new ProcessorUtil(elementUtils, messager);
    this.implementationCreator = new ImplementationCreator(typeUtils, elementUtils, filer, this.processorUtil);
    this.simpleDeserializerCreator = new SimpleDeserializerCreator(typeUtils, elementUtils, filer, this.processorUtil);
    this.complexDeserializerCreator = new ComplexDeserializerCreator(typeUtils, elementUtils, filer, this.processorUtil);
    this.setupCreator = new SetupCreator(filer, this.processorUtil);
}
 
开发者ID:peckb1,项目名称:autojackson,代码行数:16,代码来源:AutoJacksonProcessor.java

示例4: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment env) {
	super.init(env);

	ProcessorLog.init(env);

	mElementUtils = env.getElementUtils();
	mTypeUtils = env.getTypeUtils();
	mFiler = env.getFiler();
}
 
开发者ID:globulus,项目名称:easyprefs,代码行数:11,代码来源:Processor.java

示例5: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment env) {
    super.init(env);

    elementUtils = env.getElementUtils();
    typeUtils = env.getTypeUtils();
    messager = env.getMessager();
    filer = env.getFiler();
}
 
开发者ID:srym,项目名称:cuckoo,代码行数:10,代码来源:DelegationProcessor.java

示例6: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment env) {
    super.init(env);

    mElementUtils = env.getElementUtils();
    mTypeUtils = env.getTypeUtils();
    mFiler = env.getFiler();
    mJsonObjectMap = new HashMap<>();
    mProcessors = Processor.allProcessors(processingEnv);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:JsonAnnotationProcessor.java

示例7: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    mFiler = processingEnv.getFiler();
    mElementUtils = processingEnv.getElementUtils();
    mMessager = processingEnv.getMessager();
    mIsFileCreated = false;
}
 
开发者ID:QMUI,项目名称:QMUI_Android,代码行数:9,代码来源:WidgetProcessor.java

示例8: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
/**
 * init方法是在Processor创建时被javac调用并执行初始化操作。
 * @param processingEnvironment 提供一系列的注解处理工具。
 */
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
    mFiler = processingEnvironment.getFiler();
    mElementUtils = processingEnvironment.getElementUtils();
    mMessager = processingEnvironment.getMessager();
}
 
开发者ID:wangzailfm,项目名称:ImitateButterKnife,代码行数:11,代码来源:MyProcessor.java

示例9: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment pe) {
    super.init(pe);
    moduleName = pe.getOptions().get(Const.OPTION_MODULE);
    elementsUtils = pe.getElementUtils();
    filer = pe.getFiler();
    messager = pe.getMessager();
    typesUtils = pe.getTypeUtils();

    logger = new RouterLogger(messager);
}
 
开发者ID:qkcoder,项目名称:Assembler,代码行数:12,代码来源:RouterCompiler.java

示例10: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
/**
 * Initializes the processor with the processing environment by setting the processingEnv
 * field to the value of the processingEnv argument.
 *
 * @param processingEnvironment
 */
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
    super.init(processingEnvironment);

    moduleName = processingEnvironment.getOptions().get(OPTION_MODULE);
    typeUtils = processingEnvironment.getTypeUtils();
    messager = processingEnvironment.getMessager();
    filer = processingEnvironment.getFiler();
    elementUtils = processingEnvironment.getElementUtils();

    logger = new RouterLogger(messager);

    typeMirror_Interceptor = elementUtils.getTypeElement(ROUTER_INTERFACE_INTERCEPTOR).asType();
}
 
开发者ID:qkcoder,项目名称:Assembler,代码行数:21,代码来源:InterceptorCompiler.java

示例11: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
    super.init(processingEnvironment);
    mLogger = new Logger(processingEnvironment.getMessager());
    mElementUtils = processingEnvironment.getElementUtils();
    mFiler = processingEnvironment.getFiler();
}
 
开发者ID:xpleemoon,项目名称:XModulable,代码行数:8,代码来源:InjectProcessor.java

示例12: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
  public void init(ProcessingEnvironment procEnv) {
      super.init(procEnv);
elementUtils = procEnv.getElementUtils();
      filer = procEnv.getFiler();
      messager = procEnv.getMessager();
serviceAnnotation = elementUtils.getTypeElement(Service.class.getCanonicalName());
servicesAnnotation = elementUtils.getTypeElement("fr.inra.maiage.bibliome.util.service.Services");
  }
 
开发者ID:Bibliome,项目名称:bibliome-java-utils,代码行数:10,代码来源:ServiceAnnotationProcessor.java

示例13: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
    super.init(processingEnvironment);
    filer = processingEnvironment.getFiler();
    messager = processingEnvironment.getMessager();
    elements = processingEnvironment.getElementUtils();
    viewModels = new HashSet<>();
}
 
开发者ID:kakai248,项目名称:AutoViewModelFactory,代码行数:9,代码来源:AutoViewModelFactoryProcessor.java

示例14: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    elementUtils = processingEnv.getElementUtils();
    filer = processingEnv.getFiler();
    errorReporter = new ErrorReporter(processingEnv.getMessager());
}
 
开发者ID:YanXs,项目名称:auto-async,代码行数:8,代码来源:AnnotationProcessorSupport.java

示例15: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
    super.init(processingEnvironment);
    elementUtils = processingEnvironment.getElementUtils();
    filer = processingEnvironment.getFiler();
}
 
开发者ID:mirrajabi,项目名称:annotation-processor-sample,代码行数:7,代码来源:BuilderProcessor.java


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