com.atlassian.jira.config.component
Class SimpleSwitchingComponentAdaptor

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

public abstract class SimpleSwitchingComponentAdaptor
extends AbstractComponentAdaptor

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

Sub classes will need to implement 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.


Field Summary
 
Fields inherited from class com.atlassian.jira.config.component.AbstractComponentAdaptor
container, interfaceClass
 
Constructor Summary
SimpleSwitchingComponentAdaptor(Class interfaceClass)
           
 
Method Summary
abstract  Class getComponentImplementation()
           
 Object getComponentInstance()
           
 
Methods inherited from class com.atlassian.jira.config.component.AbstractComponentAdaptor
getComponentKey, getContainer, setContainer, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSwitchingComponentAdaptor

public SimpleSwitchingComponentAdaptor(Class interfaceClass)
Method Detail

getComponentInstance

public Object getComponentInstance()
                            throws org.picocontainer.PicoInitializationException,
                                   org.picocontainer.PicoIntrospectionException
Specified by:
getComponentInstance in interface org.picocontainer.ComponentAdapter
Specified by:
getComponentInstance in class AbstractComponentAdaptor
Throws:
org.picocontainer.PicoInitializationException
org.picocontainer.PicoIntrospectionException

getComponentImplementation

public abstract Class getComponentImplementation()
Specified by:
getComponentImplementation in interface org.picocontainer.ComponentAdapter
Specified by:
getComponentImplementation in class AbstractComponentAdaptor


Copyright © 2002-2009 Atlassian. All Rights Reserved.