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