com.atlassian.sal.testresources.component
Class MockComponentLocator
java.lang.Object
com.atlassian.sal.api.component.ComponentLocator
com.atlassian.sal.testresources.component.MockComponentLocator
public class MockComponentLocator
- extends ComponentLocator
Mock implementation of the component locator for testing
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockComponentLocator
public MockComponentLocator(Object... objects)
add
public MockComponentLocator add(Class<?> cls,
Object obj)
add
public MockComponentLocator add(Object obj)
getComponentInternal
protected <T> T getComponentInternal(Class<T> iface)
- Description copied from class:
ComponentLocator
- Gets the requested component, to be overridden for each application
- Specified by:
getComponentInternal in class ComponentLocator
- Parameters:
iface - The interface to lookup
- Returns:
- The implementation
create
public static MockComponentLocator create(Object... objects)
getComponentsInternal
protected <T> Collection<T> getComponentsInternal(Class<T> iface)
- Specified by:
getComponentsInternal in class ComponentLocator
getComponentInternal
protected <T> T getComponentInternal(Class<T> iface,
String componentId)
- Description copied from class:
ComponentLocator
- Gets the requested component, to be overridden for each application
- Specified by:
getComponentInternal in class ComponentLocator
- Parameters:
iface - The interface to lookupcomponentId - key of the component
- Returns:
- The implementation
Copyright © 2010 Atlassian. All Rights Reserved.