All subtypes of a serializable class are themselves serializable.
可序列化类的所有子类型本身都是可序列化的。
The algorithm USES the name of the serializable class, names of all the interfaces it implements, all the data members of the serializable class, etc.
该算法使用了可序列化的名称、类实现的所有接口的名称、可序列化类的所有数据成员,等等。
Even if a class implements Serializable, there's no guarantee that it can be serialized.
即使一个类实现了Serializable,依然不能保证它能够串行化。
I added implements Serializable to the class signature of QualifiedName and the test then passed.
我为QualifiedName的类签名添加了implements Serializable,这一次测试顺利通过。
Listing 1 shows a Person class implementing Serializable.
清单1显示一个实现Serializable的person类。
Consider a Serializable Person class that defines a friend of its own, as shown in Listing 1.
Serializable Person类定义了一个它自己的友元,如清单1所示。
The additions to the backing bean to accommodate the data selection are primarily annotations; the class must be serializable when it is placed into the conversation scope.
向提供数据选择的支持bean添加的内容主要是注释;放到conversation作用域时,必须将该类序列化。
Furthermore, all the data fields in the class must themselves be serializable.
此外,该类中的所有数据字段本身必须是序列化的。
Listing 1. Is the class serializable?
清单1.此类是否可串行化?
This is the result of the JAX-RPC behavior: JAX-RPC will make the domain name part of the URI to generate the package name for the serializable product class.
这是JAX -RPC行为的结果:JAX - RPC将使用URI的域名部分来生成可序列化产品类的包名。
MBean methods may also use other serializable data types, but doing so can create interoperability issues because the class files must be made available to the JMX client as well.
MBean方法也可以使用其他可以序列化的数据类型,但是这样做会造成互操作性问题,因为类文件也必须对JMX客户机可用。
Object serialization is an easy way for implementing the repository's persistence since the DataMapRepository class, the contained data maps, and their elements are serializable.
对象序列化是实现存储库持久性的一种最简单的方式,原因是datamaprepository类、所包含的数据地图以及它们的元素都是可序列化的。
If you want the class to be serializable, you'll need to test it, just as you would test a class that directly implements serializable.
若您希望类可串行化,就需要测试它,这与您需要测试一个直接实现了Serializable的类相同。
If a class is Serializable then all subclasses are Serializable.
如果一个类是可序列化的所有子类的序列化。
Yes, if the super class implements serializable, then so do the sub classes.
是的,如果超类实现序列化,那么子类。
For example, the Serializable Marker Interface lets the author of a class say that their class will behave correctly when serialized and deserialized.
例如,序列化的标记接口,让类的作者说,他们的课程将正确的行为时,序列化和反序列化。
It is an error to declare a class Serializable if this is not the case.
如果不是这种情况,则声明一个类为可序列化类是错误的。
If a Sub class is Serializable, it absolutely does not mean that its super class is also Serializable.
如果子类是可序列化的,它绝不意味着其超类是可序列化的。
As per comments, Globals appears to be a static class, therefore it itself is not serializable.
根据评论,Globals似乎是一个静态类,因此它本身是不可序列化的。
But if you want to prevent sub class whose superclass is serializable to be serializable it is also possible.
但是如果你想防止子类的超类是可序列化的可序列化的也可以。
But if you want to prevent sub class whose superclass is serializable to be serializable it is also possible.
但是如果你想防止子类的超类是可序列化的可序列化的也可以。
应用推荐