org.exoplatform.container
Class AbstractComponentAdapter<T>
java.lang.Object
org.exoplatform.container.AbstractComponentAdapter<T>
- All Implemented Interfaces:
- Serializable, ComponentAdapter<T>
- Direct Known Subclasses:
- InstanceComponentAdapter, MX4JComponentAdapter
public abstract class AbstractComponentAdapter<T>
- extends Object
- implements ComponentAdapter<T>, Serializable
- Version:
- $Id$
- Author:
- Nicolas Filotto
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
AbstractComponentAdapter(Object componentKey,
Class<T> componentImplementation)
Constructs a new ComponentAdapter for the given key and implementation. |
AbstractComponentAdapter
protected AbstractComponentAdapter(Object componentKey,
Class<T> componentImplementation)
throws ContainerException
- Constructs a new ComponentAdapter for the given key and implementation.
- Parameters:
componentKey - the search key for this implementationcomponentImplementation - the concrete implementation
- Throws:
ContainerException - if the key is a type and the implementation cannot be assigned to.
getComponentKey
public Object getComponentKey()
- Retrieve the key associated with the component.
- Specified by:
getComponentKey in interface ComponentAdapter<T>
- Returns:
- the component's key. Should either be a class type (normally an interface) or an identifier that is
unique (within the scope of the current Container).
getComponentImplementation
public Class<T> getComponentImplementation()
- Retrieve the class of the component.
- Specified by:
getComponentImplementation in interface ComponentAdapter<T>
- Returns:
- the component's implementation class. Should normally be a concrete class (ie, a class that can be
instantiated).
checkTypeCompatibility
protected void checkTypeCompatibility()
throws ContainerException
- Throws:
ContainerException
toString
public String toString()
- Overrides:
toString in class Object
- Returns:
- Returns the ComponentAdapter's class name and the component's key.
- See Also:
Object.toString()
Copyright © 2014 eXo Platform SAS. All Rights Reserved.