All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.plexus.personality.plexus.lifecycle.phase.ContextualizePhase Maven / Gradle / Ivy

Go to download

Statistical sampling library for use in virtdata libraries, based on apache commons math 4

There is a newer version: 5.17.0
Show newest version
package org.codehaus.plexus.personality.plexus.lifecycle.phase;

import org.codehaus.plexus.component.manager.ComponentManager;
import org.codehaus.plexus.context.Context;
import org.codehaus.plexus.context.ContextException;
import org.codehaus.plexus.lifecycle.phase.AbstractPhase;

public class ContextualizePhase
    extends AbstractPhase
{
    public void execute( Object object, ComponentManager manager )
        throws PhaseExecutionException
    {
        if ( object instanceof Contextualizable )
        {
            Context context = manager.getContainer().getContext();

            try
            {
                ( (Contextualizable) object ).contextualize( context );
            }
            catch ( ContextException e )
            {
                throw new PhaseExecutionException( "Unable to contextualize component", e );
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy