本文整理汇总了Java中javax.annotation.processing.ProcessingEnvironment.getFiler方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessingEnvironment.getFiler方法的具体用法?Java ProcessingEnvironment.getFiler怎么用?Java ProcessingEnvironment.getFiler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.annotation.processing.ProcessingEnvironment
的用法示例。
在下文中一共展示了ProcessingEnvironment.getFiler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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. <<<");
}
示例2: 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);
}
}
示例3: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
final Types typeUtils = processingEnv.getTypeUtils();
final Elements elementUtils = processingEnv.getElementUtils();
final Filer filer = processingEnv.getFiler();
final Messager messager = processingEnv.getMessager();
this.processorUtil = new ProcessorUtil(elementUtils, messager);
this.implementationCreator = new ImplementationCreator(typeUtils, elementUtils, filer, this.processorUtil);
this.simpleDeserializerCreator = new SimpleDeserializerCreator(typeUtils, elementUtils, filer, this.processorUtil);
this.complexDeserializerCreator = new ComplexDeserializerCreator(typeUtils, elementUtils, filer, this.processorUtil);
this.setupCreator = new SetupCreator(filer, this.processorUtil);
}
示例4: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment env) {
super.init(env);
ProcessorLog.init(env);
mElementUtils = env.getElementUtils();
mTypeUtils = env.getTypeUtils();
mFiler = env.getFiler();
}
示例5: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment env) {
super.init(env);
elementUtils = env.getElementUtils();
typeUtils = env.getTypeUtils();
messager = env.getMessager();
filer = env.getFiler();
}
示例6: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment env) {
super.init(env);
mElementUtils = env.getElementUtils();
mTypeUtils = env.getTypeUtils();
mFiler = env.getFiler();
mJsonObjectMap = new HashMap<>();
mProcessors = Processor.allProcessors(processingEnv);
}
示例7: 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();
mIsFileCreated = false;
}
示例8: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
/**
* init方法是在Processor创建时被javac调用并执行初始化操作。
* @param processingEnvironment 提供一系列的注解处理工具。
*/
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
mFiler = processingEnvironment.getFiler();
mElementUtils = processingEnvironment.getElementUtils();
mMessager = processingEnvironment.getMessager();
}
示例9: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment pe) {
super.init(pe);
moduleName = pe.getOptions().get(Const.OPTION_MODULE);
elementsUtils = pe.getElementUtils();
filer = pe.getFiler();
messager = pe.getMessager();
typesUtils = pe.getTypeUtils();
logger = new RouterLogger(messager);
}
示例10: 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();
}
示例11: 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();
}
示例12: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public void init(ProcessingEnvironment procEnv) {
super.init(procEnv);
elementUtils = procEnv.getElementUtils();
filer = procEnv.getFiler();
messager = procEnv.getMessager();
serviceAnnotation = elementUtils.getTypeElement(Service.class.getCanonicalName());
servicesAnnotation = elementUtils.getTypeElement("fr.inra.maiage.bibliome.util.service.Services");
}
示例13: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
super.init(processingEnvironment);
filer = processingEnvironment.getFiler();
messager = processingEnvironment.getMessager();
elements = processingEnvironment.getElementUtils();
viewModels = new HashSet<>();
}
示例14: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
elementUtils = processingEnv.getElementUtils();
filer = processingEnv.getFiler();
errorReporter = new ErrorReporter(processingEnv.getMessager());
}
示例15: init
import javax.annotation.processing.ProcessingEnvironment; //导入方法依赖的package包/类
@Override
public synchronized void init(ProcessingEnvironment processingEnvironment) {
super.init(processingEnvironment);
elementUtils = processingEnvironment.getElementUtils();
filer = processingEnvironment.getFiler();
}