本文整理汇总了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);
}
示例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();
}
示例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();
}
示例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();
}
示例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<>();
}
示例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));
}
示例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();
}
示例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());
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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");
}
示例14: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
typeUtils = processingEnv.getTypeUtils();
elementUtils = processingEnv.getElementUtils();
}
示例15: Generator
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
public Generator(ProcessingEnvironment env) {
filer = env.getFiler();
elements = env.getElementUtils();
messager = env.getMessager();
clzs = new LinkedList<>();
}