org.codehaus.waffle.testing.registrar
Class RegistrarHelper
java.lang.Object
org.codehaus.waffle.testing.registrar.RegistrarHelper
public class RegistrarHelper
- extends java.lang.Object
Registrar helper class. Retrieves controller instances registered in a Registrar and allows the registration of all
the components in a given context level.
- Author:
- Mauro Talevi
|
Method Summary |
void |
componentsFor(java.lang.Class<?> registrarType,
org.codehaus.waffle.context.ContextLevel level)
Registers the components for the given registrar and level |
java.lang.Object |
controllerFor(java.lang.Class<?> registrarType,
org.codehaus.waffle.context.ContextLevel level,
java.lang.String path)
Returns the registered controller |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegistrarHelper
public RegistrarHelper()
controllerFor
public java.lang.Object controllerFor(java.lang.Class<?> registrarType,
org.codehaus.waffle.context.ContextLevel level,
java.lang.String path)
- Returns the registered controller
- Parameters:
registrarType - the Class representing the registrar typelevel - the ContextLevelpath - the path under which the controller is registered
- Returns:
- The controller instance or
null if not found
componentsFor
public void componentsFor(java.lang.Class<?> registrarType,
org.codehaus.waffle.context.ContextLevel level)
- Registers the components for the given registrar and level
- Parameters:
registrarType - the Class representing the registrar typelevel - the ContextLevel
Copyright © 2008. All Rights Reserved.