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 java.lang.Object
- implements AdaptableService
- Author:
- Bogdan Stefanescu
Method Summary |
|
getAdapter(java.lang.Class<T> adapter)
Returns an object which is an instance of the given class
associated with this object. |
boolean |
hasAdapter(java.lang.Class<?> adapter)
|
java.lang.Object |
invokeAdapter(MethodInvocation invocation,
java.lang.Object[] args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdaptableServiceImpl
public AdaptableServiceImpl()
getAdapter
public <T> T getAdapter(java.lang.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(java.lang.Class<?> adapter)
- Specified by:
hasAdapter
in interface AdaptableService
invokeAdapter
public java.lang.Object invokeAdapter(MethodInvocation invocation,
java.lang.Object[] args)
throws NoSuchAdapterException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
- Specified by:
invokeAdapter
in interface AdaptableService
- Throws:
NoSuchAdapterException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
Copyright © 2010 Nuxeo SAS. All Rights Reserved.