當前位置: 首頁>>代碼示例>>Java>>正文


Java ProcessingEnvironment.getOptions方法代碼示例

本文整理匯總了Java中javax.annotation.processing.ProcessingEnvironment.getOptions方法的典型用法代碼示例。如果您正苦於以下問題:Java ProcessingEnvironment.getOptions方法的具體用法?Java ProcessingEnvironment.getOptions怎麽用?Java ProcessingEnvironment.getOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.annotation.processing.ProcessingEnvironment的用法示例。


在下文中一共展示了ProcessingEnvironment.getOptions方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);

    types = processingEnv.getTypeUtils();            // Get type utils.
    elements = processingEnv.getElementUtils();      // Get class meta.
    filter = processingEnvironment.getFiler();
    messager = processingEnvironment.getMessager();
    processingEnvironment.getOptions();
    Map<String, String> options = processingEnv.getOptions();
    if (options != null && !options.isEmpty()) {
        moduleName = options.get(Constant.KEY_MODULE_NAME);
        if (moduleName != null && moduleName.length() > 0) {
            moduleName = ProcessorUtils.filterModuleName(moduleName);
        }
    }
}
 
開發者ID:chiclaim,項目名稱:MRouter,代碼行數:18,代碼來源:AutowireProcessor.java

示例3: 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

示例4: init

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

	sMessager = processingEnv.getMessager();
	sTypeUtils = processingEnv.getTypeUtils();
	sElementUtils = processingEnv.getElementUtils();
	sOptions = processingEnv.getOptions();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:10,代碼來源:MvpCompiler.java

示例5: 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();

    Map<String, String> options = processingEnvironment.getOptions();
    if (options != null && !options.isEmpty()) {
        mModuleName = options.get(Constants.KEY_XMODULE);
    }
    if (mModuleName != null && !mModuleName.isEmpty()) {
        mModuleName = mModuleName.replaceAll("[^0-9a-zA-Z_]+", "");
        mLogger.info("The user has configuration the XModule, it was [" + mModuleName + "]");
    } else {
        mLogger.error("These no XModule, at 'build.gradle', like :\n" +
                "javaCompileOptions {\n" +
                "            annotationProcessorOptions {\n" +
                "                arguments = [\n" +
                "                        XModule   : moduleName\n" +
                "                ]\n" +
                "            }\n" +
                "        }");
        throw new RuntimeException(Constants.PREFIX_OF_LOGGER + "No XModule, for more information, look at gradle log.");
    }

    mXModuleLoader = mElementUtils.getTypeElement(Constants.XMODULE_LOADER);
}
 
開發者ID:xpleemoon,項目名稱:XModulable,代碼行數:29,代碼來源:XModuleProcessor.java

示例6: ModelContext

import javax.annotation.processing.ProcessingEnvironment; //導入方法依賴的package包/類
/**
 * Creates a new model context with the specified processing environment for the specified generator.
 * @param procEnv
 * @param generatorId
 */
ModelContext(ProcessingEnvironment procEnv, String generatorId) {
	super();
	typeUtils = procEnv.getTypeUtils();
	elementUtils = procEnv.getElementUtils();
       filer = procEnv.getFiler();
       messager = procEnv.getMessager();
       moduleAnnotation = elementUtils.getTypeElement(AlvisNLPModule.class.getCanonicalName());
       converterAnnotation = elementUtils.getTypeElement(Converter.class.getCanonicalName());
       libraryAnnotation = elementUtils.getTypeElement(Library.class.getCanonicalName());
       moduleBase = getModuleBase(typeUtils, elementUtils);
       TypeElement fle = getTypeElement(elementUtils, FunctionLibrary.class);
       for (ExecutableElement m : ElementFilter.methodsIn(fle.getEnclosedElements())) {
       	if (m.getSimpleName().toString().equals("resolveExpression")) {
       		resolveFunction = m;
       		break;
       	}
       }
       functionLibrary = fle.asType();
	corpusModule = getCorpusModule(typeUtils, elementUtils);
	element = getTypeMirror(elementUtils, fr.inra.maiage.bibliome.alvisnlp.core.corpus.Element.class);
	evaluationContext = getTypeMirror(elementUtils, EvaluationContext.class);
	libraryResolver = getTypeMirror(elementUtils, LibraryResolver.class);
	evaluator = getTypeMirror(elementUtils, Evaluator.class);
	expression = getTypeMirror(elementUtils, Expression.class);
	string = getTypeMirror(elementUtils, String.class);
	charSequence = getTypeMirror(elementUtils, CharSequence.class);
	processingContext = typeUtils.erasure(getTypeMirror(elementUtils, ProcessingContext.class));
	elementList = getElementList(typeUtils, elementUtils);
	elementIterator = getElementIterator(typeUtils, elementUtils);
	transformerFactory = TransformerFactory.newInstance();
       options = procEnv.getOptions();
       this.generatorId = generatorId;
       version = new Versioned("fr.inra.maiage.bibliome.alvisnlp.core.app.AlvisNLPVersion");
}
 
開發者ID:Bibliome,項目名稱:alvisnlp,代碼行數:40,代碼來源:ModelContext.java

示例7: AbstractPluginFileGenerator

import javax.annotation.processing.ProcessingEnvironment; //導入方法依賴的package包/類
protected AbstractPluginFileGenerator(ProcessingEnvironment procEnv, RoundEnvironment roundEnv) {
    this.types = procEnv.getTypeUtils();
    this.elements = procEnv.getElementUtils();
    this.roundEnv = roundEnv;
    this.msgr = procEnv.getMessager();
    this.options = procEnv.getOptions();
}
 
開發者ID:c0d3d,項目名稱:easy-plugins,代碼行數:8,代碼來源:AbstractPluginFileGenerator.java

示例8: 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();
    mLocale = processingEnv.getLocale();
    mOptions = processingEnv.getOptions();
    mTypeUtils = processingEnv.getTypeUtils();
}
 
開發者ID:2017398956,項目名稱:AbcPermission,代碼行數:11,代碼來源:GetPermissionsProcessor.java


注:本文中的javax.annotation.processing.ProcessingEnvironment.getOptions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。