美文网首页
过时废弃注释和推荐使用注释

过时废弃注释和推荐使用注释

作者: CarlosLynn | 来源:发表于2019-02-27 12:02 被阅读3次

推荐使用类的注释方式.

@deprecated Use {@link ConfigHelper}  instead.

注释方式.

   /**
     * Returns a color integer associated with a particular resource ID. If the
     * resource holds a complex {@link ColorStateList}, then the default color
     * from the set is returned.
     *
     * @param id The desired resource identifier, as generated by the aapt
     *           tool. This integer encodes the package, type, and resource
     *           entry. The value 0 is an invalid identifier.
     *
     * @throws NotFoundException Throws NotFoundException if the given ID does
     *         not exist.
     *
     * @return A single color value in the form 0xAARRGGBB.
     * @deprecated Use {@link #getColor(int, Theme)} instead.
     */
    @ColorInt
    @Deprecated
    public int getColor(@ColorRes int id) throws NotFoundException {
        return getColor(id, null);
    }

相关文章

  • 过时废弃注释和推荐使用注释

    推荐使用类的注释方式. 注释方式.

  • Python基础(一)变量和简单类型

    1. 注释 两种形式:单行注释和多行注释 多行注释,pycharm更推荐使用双引号注释,而不是单引号 2. 变量...

  • python的基础知识

    注释 1.注释的分类 注释分为单行注释和多行注释 单行注释: '# 注释信息' 多行注释: 使用三个单引号或者使用...

  • Python科学计算与数据处理2:最基本的语法

    注释 Python有两种注释方式:单行注释和多行注释。单行注释在语句开头使用(#)号标注,而多行注释则使用成对的三...

  • Python基础(一): 注释, 变量, 运算符, 输入输出语句

    注释 单行注释: 使用#进行单行注释 多行注释: 使用 ''' ''' 或 """ """ 进行多行注释 特殊注释...

  • Java语言基础

    代码注释 单行注释在注释前加上"//" 多行注释在注释前使用/*在注释后使用*/ 文档注释注释前后/***/ 变量...

  • 2017-05-10

    单行注释、多行注释与文档注释的合理使用 单行注释、多行注释与文档注释的合理使用 单行注释:// 注释内容 多行注释...

  • 良好的编程风格

    ⭕️ 正确的注释和注释风格 → 使用文档注释来注释整个类或整个方法。 → 如果注释方法中的某一个步骤,使用...

  • python3 注释

    确保对模块、函数、方法和行内注释使用正确的风格。python 中的注释有单行注释和多行注释。 单行注释 Pytho...

  • JavaScript学习笔记第三天

    语法 1.区分大小写2.标识符:命名规则和c语言一样,推荐使用驼峰命名法3.注释:和C语言相同的单行注释和多行注释...

网友评论

      本文标题:过时废弃注释和推荐使用注释

      本文链接:https://www.haomeiwen.com/subject/llixuqtx.html