List<ConfigurationSource> userConfigurationSources = context.getContainer().lookupList( ConfigurationSource.class );
public List lookupList( String role, List hints ) throws ComponentLookupException { return lookupList( role, hints, getLookupRealm() ); }
public List lookupList( Class role ) throws ComponentLookupException { return lookupList( role, getLookupRealm() ); }
public List lookupList( Class role, List hints ) throws ComponentLookupException { return lookupList( role, hints, getLookupRealm() ); }
public List lookupList( String role ) throws ComponentLookupException { return lookupList( role, getLookupRealm() ); }
public <T> List<T> lookupList( Class<T> clazz ) throws PlexusSisuBridgeException { ClassLoader ori = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( containerRealm ); return plexusContainer.lookupList( clazz ); } catch ( ComponentLookupException e ) { throw new PlexusSisuBridgeException( e.getMessage(), e ); } finally { Thread.currentThread().setContextClassLoader( ori ); } }
public <T> List<T> lookupList( Class<T> clazz ) throws PlexusSisuBridgeException { ClassLoader ori = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( containerRealm ); return plexusContainer.lookupList( clazz ); } catch ( ComponentLookupException e ) { throw new PlexusSisuBridgeException( e.getMessage(), e ); } finally { Thread.currentThread().setContextClassLoader( ori ); } }
List<EventSpy> spies = container.lookupList( EventSpy.class ); if (spies != null && !spies.isEmpty())
context.getContainer().lookupList( role );
List userConfigurationSources = context.getContainer().lookupList( ConfigurationSource.ROLE );
@Override public Mojo executeMojo(MavenSession session, MavenProject project, MojoExecution execution) throws Exception { Object sessionScope = container.lookup("org.apache.maven.SessionScope"); try { enter(sessionScope); seed(sessionScope, MavenSession.class, session); MojoExecutionScope executionScope = container.lookup(MojoExecutionScope.class); try { executionScope.enter(); executionScope.seed(MavenProject.class, project); executionScope.seed(MojoExecution.class, execution); Mojo mojo = lookupConfiguredMojo(session, execution); mojo.execute(); MojoExecutionEvent event = new MojoExecutionEvent(session, project, execution, mojo); for (MojoExecutionListener listener : container.lookupList(MojoExecutionListener.class)) { listener.afterMojoExecutionSuccess(event); } return mojo; } finally { executionScope.exit(); } } finally { exit(sessionScope); } }
@Override public Mojo executeMojo(MavenSession session, MavenProject project, MojoExecution execution) throws Exception { SessionScope sessionScope = container.lookup(SessionScope.class); try { sessionScope.enter(); sessionScope.seed(MavenSession.class, session); MojoExecutionScope executionScope = container.lookup(MojoExecutionScope.class); try { executionScope.enter(); executionScope.seed(MavenProject.class, project); executionScope.seed(MojoExecution.class, execution); Mojo mojo = lookupConfiguredMojo(session, execution); mojo.execute(); MojoExecutionEvent event = new MojoExecutionEvent(session, project, execution, mojo); for (MojoExecutionListener listener : container.lookupList(MojoExecutionListener.class)) { listener.afterMojoExecutionSuccess(event); } return mojo; } finally { executionScope.exit(); } } finally { sessionScope.exit(); } }