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


Java ProcessingEnvironment.getElementUtils方法代码示例

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


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

示例1: RequestManagerGenerator

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
RequestManagerGenerator(ProcessingEnvironment processingEnv, ProcessorUtil processorUtil) {
  this.processingEnv = processingEnv;
  this.processorUtil = processorUtil;

  Elements elementUtils = processingEnv.getElementUtils();

  requestManagerType = elementUtils.getTypeElement(REQUEST_MANAGER_QUALIFIED_NAME);
  requestManagerClassName = ClassName.get(requestManagerType);

  lifecycleType = elementUtils.getTypeElement(LIFECYCLE_QUALIFIED_NAME);
  requestManagerTreeNodeType =
      elementUtils.getTypeElement(REQUEST_MANAGER_TREE_NODE_QUALIFIED_NAME);

  requestBuilderType =
      elementUtils.getTypeElement(RequestBuilderGenerator.REQUEST_BUILDER_QUALIFIED_NAME);

  glideType = elementUtils.getTypeElement(GLIDE_QUALIFIED_NAME);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:RequestManagerGenerator.java

示例2: ToolingProvider

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
/**
 * Constructor to pass in the {@link ProcessingEnvironment}.
 *
 * @param processingEnv the processing environment to uses
 */
public ToolingProvider(ProcessingEnvironment processingEnv) {
    // create local references
    messager = processingEnv.getMessager();
    types = processingEnv.getTypeUtils();
    filer = processingEnv.getFiler();
    elements = processingEnv.getElementUtils();

}
 
开发者ID:toolisticon,项目名称:annotation-processor-toolkit,代码行数:14,代码来源:ToolingProvider.java

示例3: init

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

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

示例4: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment env) {
    filer = env.getFiler();
    messager = env.getMessager();
    trees = Trees.instance(env);
    elementUtils = env.getElementUtils();
    typeUtils = env.getTypeUtils();
}
 
开发者ID:chRyNaN,项目名称:glimpse,代码行数:9,代码来源:GlimpseAnnotationProcessor.java

示例5: EntityHandler

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
public EntityHandler(ProcessingEnvironment processingEnv) {
    this.elementUtils = processingEnv.getElementUtils();
    this.typeUtils = processingEnv.getTypeUtils();
    this.filer = processingEnv.getFiler();
    this.messager = processingEnv.getMessager();
    classEntityMap = new HashMap<>();
}
 
开发者ID:simplezhli,项目名称:RxPay,代码行数:8,代码来源:EntityHandler.java

示例6: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
  super.init(processingEnv);
  elementUtils = processingEnv.getElementUtils();
  errorReporter = new ErrorReporter(processingEnv.getMessager());
  typesUtils = processingEnv.getTypeUtils();
  processorPipelines.addAll(getProcessorPipelines(this));
}
 
开发者ID:uber,项目名称:RIBs,代码行数:9,代码来源:RibProcessor.java

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

示例8: isValueSpecMarker

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
private static boolean isValueSpecMarker(
    TypeMirror returnType, ProcessingEnvironment processingEnvironment) {
  Types types = processingEnvironment.getTypeUtils();
  Elements elements = processingEnvironment.getElementUtils();

  return types.isSameType(
      returnType, elements.getTypeElement(dataenum_case.class.getCanonicalName()).asType());
}
 
开发者ID:spotify,项目名称:dataenum,代码行数:9,代码来源:ValueParser.java

示例9: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    typeUtils = processingEnv.getTypeUtils();
    elementUtils = processingEnv.getElementUtils();
    filer = processingEnv.getFiler();
    messager = processingEnv.getMessager();
}
 
开发者ID:bboylin,项目名称:D-Router,代码行数:9,代码来源:BaseProcessor.java

示例10: 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,代码来源:GetPermissionsAutoProcessor.java

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

示例12: init

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

  mFiler = processingEnv.getFiler();
  mMessager = processingEnv.getMessager();
  mElements = processingEnv.getElementUtils();
  mTypes = processingEnv.getTypeUtils();
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:10,代码来源:ReactPropertyProcessor.java

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

示例14: init

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    typeUtils = processingEnv.getTypeUtils();
    elementUtils = processingEnv.getElementUtils();
}
 
开发者ID:ccheptea,项目名称:auto-value-node,代码行数:7,代码来源:AutoValueNodeProcessor.java

示例15: Generator

import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
public Generator(ProcessingEnvironment env) {
    filer = env.getFiler();
    elements = env.getElementUtils();
    messager = env.getMessager();
    clzs = new LinkedList<>();
}
 
开发者ID:foreveruseful,项目名称:smartkey,代码行数:7,代码来源:Generator.java


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