* session is equally important.
* @see org.eclipse.runtime.IAdapterManager
*/
- @Override
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapterType) {
- Object retVal = fSession.getModelAdapter(adapterType);
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T> T getAdapter(Class<T> adapterType) {
+ T retVal = (T)fSession.getModelAdapter(adapterType);
if (retVal == null) {
retVal = super.getAdapter(adapterType);
}
/*******************************************************************************
- * Copyright (c) 2013 Ericsson and others.
+ * Copyright (c) 2013, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*/
public class MemoryBlockRetrievalFactory implements IAdapterFactory {
- @SuppressWarnings("rawtypes")
+ @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Object adaptableObject, Class adapterType) {
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
IMemoryBlockRetrieval memRetrieval = null;
if (adaptableObject instanceof IDMContext) {
}
}
- return memRetrieval;
+ return (T)memRetrieval;
}
- @SuppressWarnings("rawtypes")
@Override
- public Class[] getAdapterList() {
+ public Class<?>[] getAdapterList() {
return new Class[] { IMemoryBlockRetrieval.class };
}
}