Skip to content

Package: ArchiveSymlink

ArchiveSymlink

nameinstructionbranchcomplexitylinemethod
ArchiveSymlink(String, String)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
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%
getLinktarget()
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 symbolic link.
8: */
9: public class ArchiveSymlink extends AbstractArchiveComponent {
10:         /**
11:          * The target of the symlink.
12:          */
13:         private final String linktarget;
14:
15:         /**
16:          * Creates a symlink with the specified path and target.
17:          *
18:          * @param name
19:          * the name of the symlink
20:          * @param linktarget
21:          * the target of the symlink
22:          */
23:         public ArchiveSymlink(final String name, final String linktarget) {
24:                 super(name);
25:                 this.linktarget = linktarget;
26:         }
27:
28:         /**
29:          * Return the linktarget.
30:          *
31:          * @return the linktarget
32:          */
33:         public String getLinktarget() {
34:                 return linktarget;
35:         }
36:
37:         @Override
38:         public void accept(final ArchiveComponentVisitor visitor)
39:                         throws FileNotFoundException, IOException {
40:                 visitor.handleArchiveSymlink(this);
41:
42:         }
43:
44: }