Package org.eclipse.core.runtime
Annotation Interface AdapterTypes
Annotation that can be used for components to specify the provided adapter
types. example use case
@Component @AdapterTypes(adaptableClass = Template.class, adapterNames = { ILabelProvider.class, IContentProvider.class }) public class TemplateAdapter implements IAdapterFactory { @Override public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { if (adaptableObject instanceof Template template) { ... } return null; } }
- Since:
- 3.19