EMMA Coverage Report (generated Mon Sep 29 15:05:28 EDT 2008)
[all classes][org.eclipse.ui.internal.dialogs]

COVERAGE SUMMARY FOR SOURCE FILE [AdaptableForwarder.java]

nameclass, %method, %block, %line, %
AdaptableForwarder.java100% (1/1)50%  (1/2)55%  (6/11)75%  (3/4)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AdaptableForwarder100% (1/1)50%  (1/2)55%  (6/11)75%  (3/4)
getAdapter (Class): Object 0%   (0/1)0%   (0/5)0%   (0/1)
AdaptableForwarder (Object): void 100% (1/1)100% (6/6)100% (3/3)

1/*******************************************************************************
2 * Copyright (c) 2000, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 * 
8 * Contributors:
9 *     IBM Corporation - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.ui.internal.dialogs;
12 
13import org.eclipse.core.runtime.IAdaptable;
14import org.eclipse.ui.internal.util.Util;
15 
16/**
17 * Class that wraps an object and forwards adapter calls if possible, otherwise
18 * returns the object. This is used to maintain API compatibility with methods that
19 * need an IAdaptable but when the operation supports a broader type.
20 * 
21 * @since 3.2
22 */
23public class AdaptableForwarder implements IAdaptable {
24 
25        private Object element;
26        
27        /**
28         * Create a new instance of the receiver.
29         * @param element
30         */
31        public AdaptableForwarder(Object element) {
32                this.element = element;
33        }
34        
35        /* (non-Javadoc)
36         * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
37         */
38        public Object getAdapter(Class adapter) {
39        return Util.getAdapter(element, adapter);
40        }
41}

[all classes][org.eclipse.ui.internal.dialogs]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov