每个班级顶部的版权信息

时间:2014-04-15 12:37:41

标签: android comments

我在谷歌或Android开发者网站上的某处读过所有新代码都需要这个:

/*
 * Copyright (C) 2013 The Android Open Source Project 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at 
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */

在项目中每个类的顶部,以及这些类型的注释:

/** 
 * Implements listeners and call backs so that the location of user can be sought 
 */

在代码中为了便于参考,但是有人知道这是什么,因为我忘了给页面添加书签,现在我无法在任何地方找到这些信息,但我知道我没有梦想过吗?

由于

1 个答案:

答案 0 :(得分:0)

您可以在此处找到该声明:http://source.android.com/source/code-style.html#use-javadoc-standard-comments

请注意,这仅适用于您为Android的源代码做出贡献的情况。他们维护代码库,因此他们可以执行自己的样式指南。如果您只是编写自己的应用程序,则可以使用任何您想要的样式。