KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > util > TypeInfoRequestorAdapter


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  *******************************************************************************/

11 package org.eclipse.jdt.internal.corext.util;
12
13 import org.eclipse.jdt.core.Signature;
14 import org.eclipse.jdt.core.search.TypeNameMatch;
15
16 import org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor;
17
18
19 public class TypeInfoRequestorAdapter implements ITypeInfoRequestor {
20     
21     private TypeNameMatch fMatch;
22     
23     public void setMatch(TypeNameMatch type) {
24         fMatch= type;
25     }
26
27     /* (non-Javadoc)
28      * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getEnclosingName()
29      */

30     public String JavaDoc getEnclosingName() {
31         return Signature.getQualifier(fMatch.getTypeQualifiedName());
32     }
33
34     /* (non-Javadoc)
35      * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getModifiers()
36      */

37     public int getModifiers() {
38         return fMatch.getModifiers();
39     }
40
41     /* (non-Javadoc)
42      * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getPackageName()
43      */

44     public String JavaDoc getPackageName() {
45         return fMatch.getPackageName();
46     }
47
48     /* (non-Javadoc)
49      * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getTypeName()
50      */

51     public String JavaDoc getTypeName() {
52         return fMatch.getSimpleTypeName();
53     }
54
55
56 }
57
Popular Tags