View Javadoc
1   package org.codehaus.plexus.archiver.util;
2   
3   import java.io.File;
4   import javax.annotation.Nonnull;
5   import org.codehaus.plexus.archiver.ArchivedFileSet;
6   
7   /**
8    * Default implementation of {@link ArchivedFileSet}.
9    *
10   * @since 1.0-alpha-9
11   */
12  public class DefaultArchivedFileSet
13      extends AbstractFileSet<DefaultArchivedFileSet>
14      implements ArchivedFileSet
15  {
16  
17      private File archive;
18  
19      public DefaultArchivedFileSet( @Nonnull File archive )
20      {
21          this.archive = archive;
22      }
23  
24      @Override
25      public File getArchive()
26      {
27          return archive;
28      }
29  
30      public static DefaultArchivedFileSet archivedFileSet( File archiveFile )
31      {
32          if ( archiveFile == null )
33          {
34              throw new IllegalArgumentException( "Archive File cannot be null" );
35          }
36          return new DefaultArchivedFileSet( archiveFile );
37      }
38  
39  }