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