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