View Javadoc
1   package org.apache.onami.lifecycle.core;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import javax.inject.Singleton;
23  
24  @Singleton
25  public class MultiLifeCycleObject
26  {
27      private final StringBuilder str = new StringBuilder();
28  
29      @TestAnnotationC
30      public void foo()
31      {
32          str.append( "c" );
33      }
34  
35      @TestAnnotationA
36      public void aaa()
37      {
38          str.append( "a" );
39      }
40  
41      @TestAnnotationB
42      public void bbb()
43      {
44          str.append( "b" );
45      }
46  
47      @TestAnnotationA
48      public void mmm()
49      {
50          str.append( "a" );
51      }
52  
53      @TestAnnotationB
54      public void nnn()
55      {
56          str.append( "b" );
57      }
58  
59      @TestAnnotationB
60      public void qqq()
61      {
62          str.append( "b" );
63      }
64  
65      @TestAnnotationA
66      public void zzz()
67      {
68          str.append( "a" );
69      }
70  
71      @Override
72      public String toString()
73      {
74          return str.toString();
75      }
76  }