Skip to content

Package: JsonLdProperty$Access

JsonLdProperty$Access

nameinstructionbranchcomplexitylinemethod
static {...}
M: 0 C: 34
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%

Coverage

1: package cz.cvut.kbss.jsonld.annotation;
2:
3: import java.lang.annotation.ElementType;
4: import java.lang.annotation.Retention;
5: import java.lang.annotation.RetentionPolicy;
6: import java.lang.annotation.Target;
7:
8: /**
9: * Allows to configure serialization and deserialization behavior for an attribute annotated by this annotation.
10: */
11: @Retention(RetentionPolicy.RUNTIME)
12: @Target(ElementType.FIELD)
13: public @interface JsonLdProperty {
14:
15: /**
16: * Allows to configure serialization and deserialization access to the property.
17: * <p>
18: * By default, the property is both serialized and deserialized. This can be restricted by making the property
19: * read-only or write-only.
20: */
21: Access access() default Access.READ_WRITE;
22:
23: /**
24: * Specifies property access options.
25: */
26: enum Access {
27: /**
28: * The property can be written to (deserialization) and read from (serialization).
29: */
30: READ_WRITE,
31: /**
32: * The property can be only read from (serialization).
33: */
34: READ_ONLY,
35: /**
36: * The property can be only written to (deserialization).
37: */
38: WRITE_ONLY
39: }
40: }