org.nuxeo.runtime.service
Class AdaptableServiceImpl
java.lang.Object
  
org.nuxeo.runtime.service.AdaptableServiceImpl
- All Implemented Interfaces: 
 - Adaptable, AdaptableService
 
- Direct Known Subclasses: 
 - Service1Impl, Service2Impl
 
public class AdaptableServiceImpl
- extends Object
- implements AdaptableService
  
- Author:
 
  - Bogdan Stefanescu
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
adapterManager
protected final AdapterManager adapterManager
adapters
protected final Map<Class<?>,Object> adapters
AdaptableServiceImpl
public AdaptableServiceImpl()
getAdapter
public <T> T getAdapter(Class<T> adapter)
- Description copied from interface: 
Adaptable 
- Returns an object which is an instance of the given class
 associated with this object. Returns 
null if
 no such object can be found.
- Specified by:
 getAdapter in interface Adaptable
 
- Parameters:
 adapter - the adapter class to look up
- Returns:
 - a object castable to the given class,
    or 
null if this object does not
    have an adapter for the given class 
 
 
hasAdapter
public boolean hasAdapter(Class<?> adapter)
- Specified by:
 hasAdapter in interface AdaptableService
 
 
invokeAdapter
public Object invokeAdapter(MethodInvocation invocation,
                            Object[] args)
                     throws NoSuchAdapterException,
                            InvocationTargetException,
                            IllegalAccessException
- Specified by:
 invokeAdapter in interface AdaptableService
 
- Throws:
 NoSuchAdapterException
InvocationTargetException
IllegalAccessException
 
Copyright © 2010 Nuxeo SAS. All Rights Reserved.