com.github.smokestack.ejb
Class MockEJBContainer

java.lang.Object
  extended by com.github.smokestack.ejb.MockEJBContainer

public class MockEJBContainer
extends Object


Field Summary
protected  Map<Class<?>,Object> beans
           
 
Constructor Summary
MockEJBContainer()
           
 
Method Summary
 void cleanInstances()
           
protected
<T> Field[]
getAllFields(Class<T> clazz)
          Recursively get all fields
protected
<T> Method[]
getAllMethods(Class<T> clazz)
          Recursively get all fields
<T> T
getInstance(Class<T> clazz)
          Setup and return an EJB instance
protected
<T> void
injectMembers(Class<T> clazz, T instance)
          Inject values for member variables
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

beans

protected Map<Class<?>,Object> beans
Constructor Detail

MockEJBContainer

public MockEJBContainer()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getInstance

public <T> T getInstance(Class<T> clazz)
              throws MockEJBContainerException
Setup and return an EJB instance

Type Parameters:
T -
Parameters:
clazz -
Returns:
Throws:
InstantiationException
IllegalAccessException
ClassNotFoundException
IllegalArgumentException
MockEJBContainerException

injectMembers

protected <T> void injectMembers(Class<T> clazz,
                                 T instance)
                      throws IllegalArgumentException,
                             IllegalAccessException,
                             InstantiationException,
                             ClassNotFoundException
Inject values for member variables

Throws:
IllegalAccessException
IllegalArgumentException
InstantiationException
ClassNotFoundException

getAllFields

protected <T> Field[] getAllFields(Class<T> clazz)
Recursively get all fields


cleanInstances

public void cleanInstances()

getAllMethods

protected <T> Method[] getAllMethods(Class<T> clazz)
Recursively get all fields



Copyright © 2009-2010 Smokestack. All Rights Reserved.