美文网首页
Cloneable源码

Cloneable源码

作者: one_mighty | 来源:发表于2018-01-12 17:28 被阅读0次

1、简介

1.1、英文注释

A class implements the Cloneable interface to indicate to the link java.lang.Object#clone() method that it is legal for that method to make a field-for-field copy of instances of that class.

1.2、中国话

实现Cloneable 接口的类是一个方法签名,它表明了该类可以使用所有累的父类的clone方法来进行对一个类成员到类成员的拷贝。

2、代码

2.1、所属包及类名

package java.lang;
public interface Cloneable {
}

2.2、类成员

2.3、类方法

另:使用详见原型设计模式

相关文章

  • Cloneable源码

    1、简介 1.1、英文注释 A class implements the Cloneable interface ...

  • 【JAVA】标记接口Cloneble用法

    最经典的标记接口,Cloneble,看下源码如下:public interface Cloneable {}看完有...

  • 深入理解-HashSet源码解读

    HashSet HashSet的源码很简单,继承自AbstractSet,实现了Set, Cloneable...

  • 【Java集合】源码分析之HashMap

    注:该文章源码基于JDK1.8 概述 HashMap实现了Serializable和cloneable接口,继承了...

  • JDK源码阅读笔记-Cloneable接口

    JDK 版本:1.8代码地址 1.前言 clone方法能方便的获得一个对象的拷贝,但其中也有些细节需要注意。 2....

  • Cloneable

    如何实现Cloneable接口?1、让该类实现java.lang.Cloneable接口;实现Cloneable接...

  • Cloneable

    Cloneable接口,JDK1.0版本引入 也是一个标记接口官方文档是这么说的一个类实现Cloneable接口,...

  • 10.21

    哪个类包含 clone 方法?是 Cloneable 还是 Object?java.lang.Cloneable ...

  • Cloneable接口

    Cloneable接口的官方解释 1.Cloneable属于标记接口,接口内部没有方法和属性。实现该接口的类的实例...

  • Cloneable相关

    18.7.191、Cloneable接口没有定义成员。2、想要使用Object提供的clone()方法,必须实现C...

网友评论

      本文标题:Cloneable源码

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