blob: 2c48ec379e16dfaf09f8275d24db2204cd312579 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007 E.D.Willink 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* E.D.Willink - initial API and implementation
*******************************************************************************/
package org.eclipse.qvt.declarative.editor.ui;
import org.eclipse.core.runtime.IAdaptable;
public class CoreUtils
{
@SuppressWarnings("unchecked")
public static <T> T getAdapter(IAdaptable adaptable, Class<T> key) {
if (adaptable == null)
return null;
return (T) adaptable.getAdapter(key);
}
}