]> git.uio.no Git - ifi-stolz-refaktor.git/blob - case-study/jdt-after/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/types/VoidType.java
b6099deefe8ba1f460c77b11504a6d6c0092e5b5
[ifi-stolz-refaktor.git] / case-study / jdt-after / core refactoring / org / eclipse / jdt / internal / corext / refactoring / typeconstraints / types / VoidType.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2011 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         @Override
23         public int getKind() {
24                 return VOID_TYPE;
25         }
26
27         @Override
28         public TType[] getSubTypes() {
29                 throw new UnsupportedOperationException();
30         }
31
32         @Override
33         protected boolean doEquals(TType type) {
34                 return true;
35         }
36
37         @Override
38         public int hashCode() {
39                 return 12345;
40         }
41         
42         @Override
43         protected boolean doCanAssignTo(TType lhs) {
44                 return false;
45         }
46
47         @Override
48         public String getName() {
49                 return "void"; //$NON-NLS-1$
50         }
51
52         @Override
53         protected String getPlainPrettySignature() {
54                 return getName();
55         }
56 }