Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.resteasy.cdi.util;
 
 
 import  javax.enterprise.inject.Produces;
 import  javax.enterprise.inject.spi.InjectionPoint;

Author(s):
Ron Sigal
Version:
$Revision: 1.1 $ Copyright Jun 11, 2012
public class UtilityProducer
   static private Random random = new Random();
   
   @Produces
   public Logger produceLog(InjectionPoint injectionPoint)
   {
      return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
   }
   
   @Produces
   public int randomInt()
   {
      return .nextInt();
   }
New to GrepCode? Check out our FAQ X