KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > typeconstraints2 > ParameterizedTypeVariable2


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
12 package org.eclipse.jdt.internal.corext.refactoring.typeconstraints2;
13
14 import org.eclipse.core.runtime.Assert;
15
16 import org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.TType;
17
18 /**
19  * A ParameterizedTypeVariable2 is a ConstraintVariable which stands for
20  * a unique parameterization of a generic type (without an updatable source location)
21  */

22 public final class ParameterizedTypeVariable2 extends ConstraintVariable2 {
23
24     public ParameterizedTypeVariable2(TType type) {
25         super(type);
26         Assert.isTrue(! type.isWildcardType());
27         Assert.isTrue(! type.isTypeVariable());
28     }
29
30     // hashCode() and equals(..) not necessary (unique per construction)
31

32     public String JavaDoc toString() {
33         return getType().getName();
34     }
35 }
36
Popular Tags