View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.internal.impl;
20  
21  import org.apache.maven.api.annotations.Experimental;
22  import org.apache.maven.api.annotations.Nonnull;
23  import org.apache.maven.api.services.MessageBuilder;
24  
25  @Experimental
26  public class DefaultMessageBuilder implements MessageBuilder {
27      private final @Nonnull org.apache.maven.shared.utils.logging.MessageBuilder delegate;
28  
29      public DefaultMessageBuilder(@Nonnull org.apache.maven.shared.utils.logging.MessageBuilder delegate) {
30          this.delegate = delegate;
31      }
32  
33      @Override
34      @Nonnull
35      public MessageBuilder success(Object o) {
36          delegate.success(o);
37          return this;
38      }
39  
40      @Override
41      @Nonnull
42      public MessageBuilder warning(Object o) {
43          delegate.warning(o);
44          return this;
45      }
46  
47      @Override
48      @Nonnull
49      public MessageBuilder failure(Object o) {
50          delegate.failure(o);
51          return this;
52      }
53  
54      @Override
55      @Nonnull
56      public MessageBuilder strong(Object o) {
57          delegate.strong(o);
58          return this;
59      }
60  
61      @Override
62      @Nonnull
63      public MessageBuilder mojo(Object o) {
64          delegate.mojo(o);
65          return this;
66      }
67  
68      @Override
69      @Nonnull
70      public MessageBuilder project(Object o) {
71          delegate.project(o);
72          return this;
73      }
74  
75      @Override
76      @Nonnull
77      public MessageBuilder a(char[] chars, int i, int i1) {
78          delegate.a(chars, i, i1);
79          return this;
80      }
81  
82      @Override
83      @Nonnull
84      public MessageBuilder a(char[] chars) {
85          delegate.a(chars);
86          return this;
87      }
88  
89      @Override
90      @Nonnull
91      public MessageBuilder a(CharSequence charSequence, int i, int i1) {
92          delegate.a(charSequence, i, i1);
93          return this;
94      }
95  
96      @Override
97      @Nonnull
98      public MessageBuilder a(CharSequence charSequence) {
99          delegate.a(charSequence);
100         return this;
101     }
102 
103     @Override
104     @Nonnull
105     public MessageBuilder a(Object o) {
106         delegate.a(o);
107         return this;
108     }
109 
110     @Override
111     @Nonnull
112     public MessageBuilder newline() {
113         delegate.newline();
114         return this;
115     }
116 
117     @Override
118     @Nonnull
119     public MessageBuilder format(String s, Object... objects) {
120         delegate.format(s, objects);
121         return this;
122     }
123 
124     @Override
125     @Nonnull
126     public String build() {
127         return delegate.toString();
128     }
129 }