1
2
3
4
5 package org.apache.maven.model;
6
7 import java.io.Serializable;
8 import java.util.AbstractList;
9 import java.util.Collections;
10 import java.util.HashMap;
11 import java.util.LinkedHashMap;
12 import java.util.List;
13 import java.util.Map;
14 import java.util.Objects;
15 import java.util.Set;
16 import java.util.stream.Collectors;
17 import java.util.stream.Stream;
18 import org.apache.maven.api.annotations.Generated;
19 import org.apache.maven.api.annotations.Nonnull;
20
21 @Generated
22 public class ActivationFile
23 extends BaseObject
24 {
25
26 public ActivationFile() {
27 this(org.apache.maven.api.model.ActivationFile.newInstance());
28 }
29
30 public ActivationFile(org.apache.maven.api.model.ActivationFile delegate) {
31 this(delegate, null);
32 }
33
34 public ActivationFile(org.apache.maven.api.model.ActivationFile delegate, BaseObject parent) {
35 super(delegate, parent);
36 }
37
38 public ActivationFile clone(){
39 return new ActivationFile(getDelegate());
40 }
41
42 public org.apache.maven.api.model.ActivationFile getDelegate() {
43 return (org.apache.maven.api.model.ActivationFile) super.getDelegate();
44 }
45
46 @Override
47 public boolean equals(Object o) {
48 if (this == o) {
49 return true;
50 }
51 if (o == null || !(o instanceof ActivationFile)) {
52 return false;
53 }
54 ActivationFile that = (ActivationFile) o;
55 return Objects.equals(this.delegate, that.delegate);
56 }
57
58 @Override
59 public int hashCode() {
60 return getDelegate().hashCode();
61 }
62
63 public String getMissing() {
64 return getDelegate().getMissing();
65 }
66
67 public void setMissing(String missing) {
68 if (!Objects.equals(missing, getMissing())) {
69 update(getDelegate().withMissing(missing));
70 }
71 }
72
73 public String getExists() {
74 return getDelegate().getExists();
75 }
76
77 public void setExists(String exists) {
78 if (!Objects.equals(exists, getExists())) {
79 update(getDelegate().withExists(exists));
80 }
81 }
82
83 public InputLocation getLocation(Object key) {
84 org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
85 return loc != null ? new InputLocation(loc) : null;
86 }
87
88 public void setLocation(Object key, InputLocation location) {
89 update(org.apache.maven.api.model.ActivationFile.newBuilder(getDelegate(), true)
90 .location(key, location != null ? location.toApiLocation() : null).build());
91 }
92
93 public InputLocation getImportedFrom() {
94 org.apache.maven.api.model.InputLocation loc = getDelegate().getImportedFrom();
95 return loc != null ? new InputLocation(loc) : null;
96 }
97
98 public void setImportedFrom(InputLocation location) {
99 update(org.apache.maven.api.model.ActivationFile.newBuilder(getDelegate(), true)
100 .importedFrom(location != null ? location.toApiLocation() : null).build());
101 }
102
103 public Set<Object> getLocationKeys() {
104 return getDelegate().getLocationKeys();
105 }
106
107 protected boolean replace(Object oldDelegate, Object newDelegate) {
108 if (super.replace(oldDelegate, newDelegate)) {
109 return true;
110 }
111 return false;
112 }
113
114 public static List<org.apache.maven.api.model.ActivationFile> activationFileToApiV4(List<ActivationFile> list) {
115 return list != null ? new WrapperList<>(list, ActivationFile::getDelegate, ActivationFile::new) : null;
116 }
117
118 public static List<ActivationFile> activationFileToApiV3(List<org.apache.maven.api.model.ActivationFile> list) {
119 return list != null ? new WrapperList<>(list, ActivationFile::new, ActivationFile::getDelegate) : null;
120 }
121
122 }