Skip to content

Commit

Permalink
Moved LocalLiteral to Local.Literal.INSTANCE
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jul 24, 2017
1 parent 4dea267 commit ef0f7d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.AnnotationLiteral;
import javax.inject.Qualifier;

import org.jboss.forge.furnace.addons.Addon;
Expand All @@ -31,5 +32,14 @@
@Target(value = { ElementType.PARAMETER })
public @interface Local
{
/**
* Supports inline instantiation of the {@link Local} qualifier.
*/
public static final class Literal extends AnnotationLiteral<Local> implements Local
{
public static final Literal INSTANCE = new Literal();

private static final long serialVersionUID = 1L;

}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.jboss.forge.furnace.addons.AddonRegistry;
import org.jboss.forge.furnace.container.cdi.events.EventManagerImpl;
import org.jboss.forge.furnace.container.cdi.events.EventManagerProducer;
import org.jboss.forge.furnace.container.cdi.events.LocalLiteral;
import org.jboss.forge.furnace.container.cdi.events.Local;
import org.jboss.forge.furnace.container.cdi.impl.AddonProducer;
import org.jboss.forge.furnace.container.cdi.impl.AddonRegistryProducer;
import org.jboss.forge.furnace.container.cdi.impl.AddonRepositoryProducer;
Expand Down Expand Up @@ -117,14 +117,14 @@ public void start(Addon addon) throws Exception
public void postStartup(Addon addon)
{
if (eventManager != null)
eventManager.fireEvent(new PostStartup(addon), new LocalLiteral());
eventManager.fireEvent(new PostStartup(addon), Local.Literal.INSTANCE);
}

@Override
public void preShutdown(Addon addon)
{
if (eventManager != null)
eventManager.fireEvent(new PreShutdown(addon), new LocalLiteral());
eventManager.fireEvent(new PreShutdown(addon), Local.Literal.INSTANCE);
}

@Override
Expand Down

0 comments on commit ef0f7d3

Please sign in to comment.