es.webbeta.serializer.metadata.MetadataVirtualProperty   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 16
c 1
b 0
f 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setAccessor(MetadataPropertyAccessor) 0 3 1
A setAccessType(FieldAccessType) 0 3 1
A MetadataVirtualProperty(String) 0 4 1
1
package es.webbeta.serializer.metadata;
2
3
import es.webbeta.serializer.base.MetadataProperty;
4
import es.webbeta.serializer.type.FieldAccessType;
5
6
public class MetadataVirtualProperty extends es.webbeta.serializer.metadata.MetadataProperty implements MetadataProperty {
7
8
    MetadataVirtualProperty(String virtualPropertyName) {
9
        super(virtualPropertyName);
10
        this.accessType = FieldAccessType.PUBLIC_METHOD;
11
        this.accessor = new MetadataPropertyAccessor(virtualPropertyName);
12
    }
13
14
    @Override
15
    public void setAccessType(FieldAccessType accessType) {
16
        throw new IllegalArgumentException("Virtual properties have preset access type as PUBLIC_METHOD.");
17
    }
18
19
    @Override
20
    public void setAccessor(MetadataPropertyAccessor accessor) {
21
        throw new IllegalArgumentException("Virtual properties have preset accessor as its name.");
22
    }
23
24
}