gpt4 book ai didi

java - 在android编程中,类名连接下划线是什么意思?

转载 作者:行者123 更新时间:2023-12-01 10:41:22 24 4
gpt4 key购买 nike

public class VideoFragment extends Fragment implements CacheListener {
...
public static Fragment build(String url, String cachePath) {
return VideoFragment_.builder()
.url(url)
.cachePath(cachePath)
.build();
}
...
}

我搜索了很多,但仍然不知道“VideoFragment_”?有人可以给我一些要点吗?

最佳答案

下划线在Java或Android中没有特殊含义。这只是名称的一部分。

您需要询问代码的原始作者这样命名的 Intent 是什么。

<小时/>

来自评论:

In fact, I'm studying this android project in github

这是与问题相关的信息。该项目正在使用android-annotations enhanced fragments其中:

AndroidAnnotations will generate a fragment subclass with a trailing underscore, e.g. MyFragment_. You should use the generated subclass in your xml layouts and when creating new instance fragments

所以这是注释处理器的一个功能。

关于java - 在android编程中,类名连接下划线是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34396217/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com