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