1
2
3
4 package org.apache.maven.model;
5
6 import java.io.Serializable;
7 import java.util.AbstractList;
8 import java.util.ArrayList;
9 import java.util.Collections;
10 import java.util.HashMap;
11 import java.util.List;
12 import java.util.Map;
13 import java.util.Objects;
14 import java.util.stream.Collectors;
15 import java.util.stream.Stream;
16 import org.apache.maven.api.annotations.Generated;
17 import org.apache.maven.api.annotations.Nonnull;
18
19 @Generated
20 public class FileSet
21 extends PatternSet
22 implements Serializable, Cloneable
23 {
24
25 public FileSet()
26 {
27 this( org.apache.maven.api.model.FileSet.newInstance() );
28 }
29
30 public FileSet( org.apache.maven.api.model.FileSet delegate )
31 {
32 this( delegate, null );
33 }
34
35 public FileSet( org.apache.maven.api.model.FileSet delegate, BaseObject parent )
36 {
37 super( delegate, parent );
38 }
39
40 public FileSet clone()
41 {
42 return new FileSet( getDelegate() );
43 }
44
45 @Override
46 public org.apache.maven.api.model.FileSet getDelegate()
47 {
48 return ( org.apache.maven.api.model.FileSet ) super.getDelegate();
49 }
50
51 public String getDirectory()
52 {
53 return getDelegate().getDirectory();
54 }
55
56 public void setDirectory( String directory )
57 {
58 if ( !Objects.equals( directory, getDelegate().getDirectory() ) )
59 {
60 update( getDelegate().withDirectory( directory ) );
61 }
62 }
63
64 public InputLocation getLocation( Object key )
65 {
66 org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation( key );
67 return loc != null ? new InputLocation( loc ) : null;
68 }
69
70 public void setLocation( Object key, InputLocation location )
71 {
72 update( org.apache.maven.api.model.FileSet.newBuilder( getDelegate(), true )
73 .location( key, location.toApiLocation() ).build() );
74 }
75
76 protected boolean replace( Object oldDelegate, Object newDelegate )
77 {
78 if ( super.replace( oldDelegate, newDelegate ) )
79 {
80 return true;
81 }
82 return false;
83 }
84
85 public static List<org.apache.maven.api.model.FileSet> fileSetToApiV4( List<FileSet> list )
86 {
87 return list != null ? new WrapperList<>( list, FileSet::getDelegate, FileSet::new ) : null;
88 }
89
90 public static List<FileSet> fileSetToApiV3( List<org.apache.maven.api.model.FileSet> list )
91 {
92 return list != null ? new WrapperList<>( list, FileSet::new, FileSet::getDelegate ) : null;
93 }
94
95
96
97
98
99
100 public String toString()
101 {
102 return "FileSet {directory: " + getDirectory() + ", " + super.toString() + "}";
103 }
104
105
106 }