當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。