@Target(METHOD) @Retention(RUNTIME) public @interface TransientIndicates that an attribute called "transient" should be declared with the given
EventSetDescriptorclasses associated with the annotated code element. A
truevalue for the "transient" attribute indicates to encoders derived from
Encoderthat this feature should be ignored.
Transientannotation may be used in any of the methods that are involved in a
FeatureDescriptorsubclass to identify the transient feature in the annotated class and its subclasses. Normally, the method that starts with "get" is the best place to put the annotation and it is this declaration that takes precedence in the case of multiple annotations being defined for the same feature.
To declare a feature non-transient in a class whose superclass declares it transient, use
@Transient(false). In all cases, the
Introspectordecides if a feature is transient by referring to the annotation on the most specific superclass. If no
Transientannotation is present in any superclass the feature is not transient.
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description
valueReturns whether or not the
Introspectorshould construct artifacts for the annotated method.