在onPostTransform方法中如何修改源码呢,请指教 #400
Answered
by
johnsonlee
hellokai55
asked this question in
Q&A
-
我的需求是这样的: 针对于每一个module会生成一个Mapping_xxx.java,里面会有一个返回map的方法;想在编译期给他们聚合起来,写了一个源文件Mapping.java类,提供了一个inject()的空方法,想在这个方法里把遍历所有的符合条件的Mapping_xxx.java的map加到一起,运行时其他人直接调Mapping.java类就好了。 如果写一个自定义的ClassTransformer,那么在transform做寻找Mapping_xxx.java和Mapping.java的聚合就会有顺序问题;所以想要先遍历一遍把所有的Mapping_xxx.java都找到,然后再修改Mapping.java中的inject方法做聚合,能在onPostTransform中再修改Mapping.java类吗,该怎么做呢? |
Beta Was this translation helpful? Give feedback.
Answered by
johnsonlee
Dec 8, 2022
Replies: 1 comment 4 replies
-
You can use Booster Collector API to collect information before the transform pipeline is executed. Please refer to Multi-Round Transformer to get more details. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
hellokai55
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use Booster Collector API to collect information before the transform pipeline is executed.
Please refer to Multi-Round Transformer to get more details.