com.atlassian.jira.config.component
Class SimpleSwitchingComponentAdaptor<T>

java.lang.Object
  extended by com.atlassian.jira.config.component.AbstractComponentAdaptor<T>
      extended by com.atlassian.jira.config.component.SimpleSwitchingComponentAdaptor<T>
All Implemented Interfaces:
org.picocontainer.ComponentAdapter<T>

public abstract class SimpleSwitchingComponentAdaptor<T>
extends AbstractComponentAdaptor<T>

A simple component adapter that will pull the implementation of the object from the container.

Sub classes will need to implement ComponentAdapter.getComponentImplementation() and specify the correct class.

This class returns the object directly (no fancy dynamic proxies), so consumers of these objects should not cache them if they wish to be updated when the object changes.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.picocontainer.ComponentAdapter
org.picocontainer.ComponentAdapter.NOTHING
 
Field Summary
 
Fields inherited from class com.atlassian.jira.config.component.AbstractComponentAdaptor
interfaceClass
 
Constructor Summary
protected SimpleSwitchingComponentAdaptor(Class<T> interfaceClass)
           
 
Method Summary
 T getComponentInstance(org.picocontainer.PicoContainer container)
           
 String getDescriptor()
           
 
Methods inherited from class com.atlassian.jira.config.component.AbstractComponentAdaptor
accept, findAdapterOfType, getComponentInstance, getComponentKey, getDelegate, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.picocontainer.ComponentAdapter
getComponentImplementation
 

Constructor Detail

SimpleSwitchingComponentAdaptor

protected SimpleSwitchingComponentAdaptor(Class<T> interfaceClass)
Method Detail

getComponentInstance

public T getComponentInstance(org.picocontainer.PicoContainer container)
                       throws org.picocontainer.PicoCompositionException
Throws:
org.picocontainer.PicoCompositionException

getDescriptor

public String getDescriptor()
Specified by:
getDescriptor in interface org.picocontainer.ComponentAdapter<T>
Overrides:
getDescriptor in class AbstractComponentAdaptor<T>


Copyright © 2002-2014 Atlassian. All Rights Reserved.