KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > apt > core > internal > type > VoidTypeImpl


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc.
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  * tyeung@bea.com - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.apt.core.internal.type;
13
14 import com.sun.mirror.type.VoidType;
15 import com.sun.mirror.util.TypeVisitor;
16
17 import org.eclipse.jdt.apt.core.internal.declaration.EclipseMirrorType;
18 import org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv;
19
20 import org.eclipse.jdt.core.dom.ITypeBinding;
21
22 public class VoidTypeImpl implements VoidType, EclipseMirrorType
23 {
24     private final ITypeBinding _binding;
25
26     public VoidTypeImpl(final ITypeBinding binding){
27         assert binding != null : "missing binding"; //$NON-NLS-1$
28
_binding = binding;
29     }
30     
31     public void accept(TypeVisitor visitor)
32     {
33         visitor.visitVoidType(this);
34     }
35
36     public String JavaDoc toString(){ return "void"; } //$NON-NLS-1$
37

38     public ITypeBinding getTypeBinding(){return _binding;}
39
40     public MirrorKind kind(){ return MirrorKind.TYPE_VOID; }
41     
42     public BaseProcessorEnv getEnvironment(){ return null; }
43
44     public boolean isAssignmentCompatible(EclipseMirrorType left) {
45         return false;
46     }
47
48     public boolean isSubTypeCompatible(EclipseMirrorType type) {
49         return false;
50     }
51 }
52
Popular Tags