本文整理匯總了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<>();
}