javadoc中的注解@see

今天在看java Map源码时发现了一个@see 代码片如下

/**
     * Returns the hash code value for this map.  The hash code of a map is
     * defined to be the sum of the hash codes of each entry in the map's
     * <tt>entrySet()</tt> view.  This ensures that <tt>m1.equals(m2)</tt>
     * implies that <tt>m1.hashCode()==m2.hashCode()</tt> for any two maps
     * <tt>m1</tt> and <tt>m2</tt>, as required by the general contract of
     * {@link Object#hashCode}.
     *
     * @return the hash code value for this map
     * @see Map.Entry#hashCode()
     * @see Object#equals(Object)
     * @see #equals(Object)
     */
    int hashCode();

出于好奇总结了一下:

注解@see可以在注释中实现链接跳转.@see可以指向包,类,方法,属性.

使用方法格式:@see Map.Entry#hashCode()

如果指向的在当前类中,可以只写井号后面的.

/**
	*@see #field
	*@see #method(Type, Type,...)
*/

如果指向的在当前包中,可以省略包名.

/**
	*@see Class#field
	*@see Class#method(Type, Type,...)
*/

如果在其他包中,需要指向全路径.

/**
	*@see package.Class#field
	*@see package.Class#method(Type, Type,...)
	*/
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值