本文整理了Java中org.eclipse.core.internal.runtime.AdapterManager.getAdapter()
方法的一些代码示例,展示了AdapterManager.getAdapter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AdapterManager.getAdapter()
方法的具体详情如下:
包路径:org.eclipse.core.internal.runtime.AdapterManager
类名称:AdapterManager
方法名:getAdapter
[英]Returns an adapter of the given type for the provided adapter.
[中]为提供的适配器返回给定类型的适配器。
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common
public Object loadAdapter(Object adaptable, String adapterTypeName) {
return getAdapter(adaptable, adapterTypeName, true);
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common
@Override
public Object loadAdapter(Object adaptable, String adapterTypeName) {
return getAdapter(adaptable, adapterTypeName, true);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
@Override
public Object loadAdapter(Object adaptable, String adapterTypeName) {
return getAdapter(adaptable, adapterTypeName, true);
}
代码示例来源:origin: org.eclipse.equinox/common
public Object loadAdapter(Object adaptable, String adapterTypeName) {
return getAdapter(adaptable, adapterTypeName, true);
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common
@Override
public Object getAdapter(Object adaptable, String adapterType) {
Assert.isNotNull(adaptable);
Assert.isNotNull(adapterType);
return getAdapter(adaptable, adapterType, false);
}
代码示例来源:origin: org.eclipse.equinox/common
public Object getAdapter(Object adaptable, String adapterType) {
Assert.isNotNull(adaptable);
Assert.isNotNull(adapterType);
return getAdapter(adaptable, adapterType, false);
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common
public Object getAdapter(Object adaptable, String adapterType) {
Assert.isNotNull(adaptable);
Assert.isNotNull(adapterType);
return getAdapter(adaptable, adapterType, false);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
@Override
public Object getAdapter(Object adaptable, String adapterType) {
Assert.isNotNull(adaptable);
Assert.isNotNull(adapterType);
return getAdapter(adaptable, adapterType, false);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
@Override
public <T> T getAdapter(Class<T> adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: org.eclipse.equinox/common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
public Object getAdapter(Class adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
public Object getAdapter(Class adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common
/**
* Returns an object which is an instance of the given class
* associated with this object. Returns <code>null</code> if
* no such object can be found.
* <p>
* This implementation of the method declared by <code>IAdaptable</code>
* passes the request along to the platform's adapter manager; roughly
* <code>Platform.getAdapterManager().getAdapter(this, adapter)</code>.
* Subclasses may override this method (however, if they do so, they
* should invoke the method on their superclass to ensure that the
* Platform's adapter manager is consulted).
* </p>
*
* @param adapter the class to adapt to
* @return the adapted object or <code>null</code>
* @see IAdaptable#getAdapter(Class)
*/
@Override
public <T> T getAdapter(Class<T> adapter) {
return AdapterManager.getDefault().getAdapter(this, adapter);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
private static Object queryAdapterManager(Object sourceObject, String adapterId, boolean allowActivation) {
Object result;
if (allowActivation) {
result = AdapterManager.getDefault().loadAdapter(sourceObject, adapterId);
} else {
result = AdapterManager.getDefault().getAdapter(sourceObject, adapterId);
}
return result;
}
}
内容来源于网络,如有侵权,请联系作者删除!