在Java代码注释中使用方括号的目的是什么? [英] What is the purpose of using square brackets in Java code comment?

查看:154
本文介绍了在Java代码注释中使用方括号的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在评论中看到了Google使用方括号的一些Java代码。

例如:

I saw some Java code by Google using square bracket in comment.
For example:

// [START initialize_auth]
mAuth = FirebaseAuth.getInstance();
// [END initialize_auth]

此款式有什么特殊用途吗?

Is there any special purpose for this style?

推荐答案

这些片段是 Firebase文档

您可以点击Firebase网站上的类名,然后您将进入示例代码的相应块。

You can click the class names on the Firebase site, and you will be taken to the corresponding block of the example code.

很难说这是否是动态生成的HTML,但纯Java中的这些注释没有这种特殊语法

Hard to say if that is dynamically generated HTML, but there is no such special syntax for those comments in pure Java

同样的问题,但对于iOS:这个目标是什么-C / XCode注释// [START_EXCLUDE]

Same question, but for iOS: What is this Objective-C/XCode annotation // [START_EXCLUDE]

这篇关于在Java代码注释中使用方括号的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆