KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > typeconstraints > types > VoidType


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.refactoring.typeconstraints.types;
12
13 import org.eclipse.jdt.core.Signature;
14
15
16 public final class VoidType extends TType {
17
18     protected VoidType(TypeEnvironment environment) {
19         super(environment, Signature.createTypeSignature("void", true)); //$NON-NLS-1$
20
}
21
22     public int getKind() {
23         return VOID_TYPE;
24     }
25
26     public TType[] getSubTypes() {
27         throw new UnsupportedOperationException JavaDoc();
28     }
29     
30     protected boolean doEquals(TType type) {
31         return true;
32     }
33
34     protected boolean doCanAssignTo(TType lhs) {
35         return false;
36     }
37
38     public String JavaDoc getName() {
39         return "void"; //$NON-NLS-1$
40
}
41
42     protected String JavaDoc getPlainPrettySignature() {
43         return getName();
44     }
45 }
46
Popular Tags