This annotation must be specified for classes which have
attributes for which the serializer generator should generate code.
Classes not annotated with this annotation but which have a superclass
which is annotated with this annotation but will be considered an empty
class annotated with this annotation and isAbstract being set to true.
For classes which are annotated by this anotation, the following things are generated in the package serializer:
- A TYPEID_ constant if the annotation is not marked abstract by the isAbstract attribute.
- Constants for each attribute annotated with @PofAttribute
holding the lowest property id used for writing out its value (more
than one but consecutive property ids may be used up to write out the
state of an attribute).
- A serializer class which may be
referred to in the POF context configuration (the configuration is
to-be-generated in a later version).
Attributes:
Attribute |
Type |
Default value |
Description |
implVersion |
int |
special |
This attribute indicates the
implementation version of this form of the class. The implementation
version must be higher than or equal to the sinceImpl version of all
attributes declared in this class, and must also be higher than or
equal to the sinceImplVersion of this class, and also must be higher
than or equal to the explicitly stated or inferred implVersion value of
its super-class (if there is one).
This value is returned by the SimpleEvolvable.getImplVersion() method.
If
the value is not specified, then it is the higher of the highest
attribute sinceImplVersion value and the (possibly inferred) value of
the sinceImplVersion attribute on this annotation and the (possibly
inferred) value of the implVersion attribute on the annotation of the
super-class of this class (if there is one). |
|
sinceImplVersion |
int |
special |
The first version of the class hierarchy which first declared this class.
The value of this attribute must be higher than or equal to the (possibly
inferred) corresponding value of its superclass. The value of this
attribute must also be lower than or equal to the specified
sinceImplVersion values of any of its declared attributes.
If this attribute is omitted, then its value is inferred to be:
- If the class declares attributes to be serialized and they all explicitly specify their sinceImplVersion attributes in the @PofAttribute annotation,
then the class level sinceImplVersion is inferred to be the lowest
value of the declared attribute sinceImplVersion values.
- Otherwise if there is a superclass, then it is the sinceImplVersion value of the superclass
- Otherwise it is inferred to be 1.
|
|
typeId |
int |
N/A |
This is the user type id to be used for this class. This must be specified
for non-abstract classes, and should be an integer value larger than or equal to 1000. Values less than that are reserved by Oracle for Coherence and JDK classes.
It can be omitted for abstract classes or classes
where isAbstract is set to true. |
|
isAbstract |
boolean |
false |
Indicates that the class does not need a type id constant to be written and that it can't be serialized (its descendants still can). If the class itself is an
abstract class, this attribute is considered to be true even if it was not specified.
Abstract classes don't have a TYPEID_ constant in their
package serializer, nor do they have a serializer. |
|