01: /*******************************************************************************
02: * Copyright (c) 2001, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.views.properties.tabbed;
11:
12: /**
13: * Allows property sheet page contributors to map the input object type to a
14: * domain model type. The domain model type is then used for matching against
15: * the input attribute of the propertySection extension.
16: * <p>
17: * The type mapper is most frequently used to return the type of the model
18: * object when selecting a view object in a workbench part. For example, nodes
19: * in a tree may all be TreeObjects in a structured selection. The type mapper
20: * will take the tree node and return the type of the model object the node
21: * represents.
22: * </p>
23: * <p>
24: * This interface should not be extended or implemented. New type mapper instances
25: * should be created using <code>AbstractTypeMapper</code>.
26: * </p>
27: *
28: * @author Anthony Hunter
29: */
30: public interface ITypeMapper {
31:
32: /**
33: * Map the input object to a domain model type.
34: *
35: * @param object
36: * the input object.
37: * @return the type of the input object, mapped to the domain type if
38: * required.
39: */
40: public Class mapType(Object object);
41: }
|