View Javadoc
1   package org.codehaus.plexus.test;
2   
3   import org.codehaus.plexus.PlexusContainer;
4   import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
5   import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException;
6   import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException;
7   
8   public class DefaultCircularComponent implements CircularComponent, Startable {
9       private PlexusContainer container;
10      private String lookup;
11      private CircularComponent requirement;
12  
13      public void start() throws StartingException {
14          try {
15              if (lookup != null) {
16                  container.lookup(CircularComponent.class, lookup);
17              }
18          } catch (Exception e) {
19              throw new StartingException("failed", e);
20          }
21      }
22  
23      public void stop() throws StoppingException {}
24  }