Skip to contentMethod: accept(ArchiveComponentVisitor)
      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: }