Skip to content

Package: ArchiveDevNode

ArchiveDevNode

nameinstructionbranchcomplexitylinemethod
ArchiveDevNode(String, int, char, int, int)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
accept(ArchiveComponentVisitor)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getDevtype()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMajor()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMinor()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: package archive;
2:
3: import java.io.FileNotFoundException;
4: import java.io.IOException;
5:
6: /**
7: * Represents a device-node.
8: */
9: public class ArchiveDevNode extends AccessibleAbstractArchiveComponent {
10:
11:         /**
12:          * the devtype. b for block device, c for character device.
13:          */
14:         private final char devtype;
15:         /**
16:          * the major-value.
17:          */
18:         private final int major;
19:         /**
20:          * the minor-value.
21:          */
22:         private final int minor;
23:
24:         /**
25:          * Creates a dev-node.
26:          *
27:          * @param name
28:          * the name of the dev-node
29:          * @param mode
30:          * the access permission of the dev-node
31:          * @param devtype
32:          * the devtype must be 'b' for block device or 'c' for character device
33:          * @param major
34:          * the major of the dev-node
35:          * @param minor
36:          * the minor of the dev-node
37:          */
38:         public ArchiveDevNode(final String name, final int mode, final char devtype, final int major,
39:                         final int minor) {
40:                 super(name, mode);
41:                 this.devtype = devtype;
42:                 this.major = major;
43:                 this.minor = minor;
44:         }
45:
46:         /**
47:          * @return the devtype
48:          */
49:         public char getDevtype() {
50:                 return this.devtype;
51:         }
52:
53:         /**
54:          * @return the major
55:          */
56:         public int getMajor() {
57:                 return this.major;
58:         }
59:
60:         /**
61:          * @return the minor
62:          */
63:         public int getMinor() {
64:                 return this.minor;
65:         }
66:
67:         @Override
68:         public void accept(final ArchiveComponentVisitor visitor)
69:                         throws FileNotFoundException, IOException, IllegalDeviceTypeException {
70:                 visitor.handleArchiveDevNode(this);
71:         }
72:
73: }