KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > hierarchy > HierarchyType


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.core.hierarchy;
12
13 import org.eclipse.jdt.core.IType;
14 import org.eclipse.jdt.internal.compiler.env.IGenericType;
15
16 /**
17  *
18  * Partial implementation of an IGenericType used to
19  * answer hierarchies.
20  */

21 public class HierarchyType implements IGenericType {
22
23     public IType typeHandle;
24     public char[] name;
25     public int modifiers;
26     public char[] superclassName;
27     public char[][] superInterfaceNames;
28     
29 public HierarchyType(
30     IType typeHandle,
31     char[] name,
32     int modifiers,
33     char[] superclassName,
34     char[][] superInterfaceNames) {
35         
36     this.typeHandle = typeHandle;
37     this.name = name;
38     this.modifiers = modifiers;
39     this.superclassName = superclassName;
40     this.superInterfaceNames = superInterfaceNames;
41 }
42 /**
43  * @see org.eclipse.jdt.internal.compiler.env.IDependent#getFileName()
44  */

45 public char[] getFileName() {
46     return this.typeHandle.getCompilationUnit().getElementName().toCharArray();
47 }
48
49 /**
50  * Answer an int whose bits are set according the access constants
51  * defined by the VM spec.
52  */

53 public int getModifiers() {
54     return this.modifiers;
55 }
56 /**
57  * Answer whether the receiver contains the resolved binary form
58  * or the unresolved source form of the type.
59  */

60 public boolean isBinaryType() {
61     return false;
62 }
63 }
64
Popular Tags