KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > google > gwt > core > ext > typeinfo > JType


1 /*
2  * Copyright 2006 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */

16 package com.google.gwt.core.ext.typeinfo;
17
18 /**
19  * Abstract superclass for types.
20  */

21 public abstract class JType {
22   public abstract String JavaDoc getJNISignature();
23
24   public JType getLeafType() {
25     return this;
26   }
27
28   public String JavaDoc getParameterizedQualifiedSourceName() {
29     return getQualifiedSourceName();
30   }
31
32   public abstract String JavaDoc getQualifiedSourceName();
33
34   public abstract String JavaDoc getSimpleSourceName();
35
36   public abstract JArrayType isArray();
37
38   public abstract JClassType isClass();
39
40   public JClassType isClassOrInterface() {
41     JClassType type = isClass();
42     if (type != null) {
43       return type;
44     }
45     return isInterface();
46   }
47
48   public abstract JClassType isInterface();
49
50   public abstract JParameterizedType isParameterized();
51
52   public abstract JPrimitiveType isPrimitive();
53 }
54
Popular Tags