KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > views > properties > tabbed > ITypeMapper


1 /*******************************************************************************
2  * Copyright (c) 2001, 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  *******************************************************************************/

11 package org.eclipse.ui.views.properties.tabbed;
12
13 /**
14  * Allows property sheet page contributors to map the input object type to a
15  * domain model type. The domain model type is then used for matching against
16  * the input attribute of the propertySection extension.
17  * <p>
18  * The type mapper is most frequently used to return the type of the model
19  * object when selecting a view object in a workbench part. For example, nodes
20  * in a tree may all be TreeObjects in a structured selection. The type mapper
21  * will take the tree node and return the type of the model object the node
22  * represents.
23  * </p>
24  * <p>
25  * This interface should not be extended or implemented. New type mapper instances
26  * should be created using <code>AbstractTypeMapper</code>.
27  * </p>
28  *
29  * @author Anthony Hunter
30  */

31 public interface ITypeMapper {
32
33     /**
34      * Map the input object to a domain model type.
35      *
36      * @param object
37      * the input object.
38      * @return the type of the input object, mapped to the domain type if
39      * required.
40      */

41     public Class JavaDoc mapType(Object JavaDoc object);
42 }
43
Popular Tags