]> source.dussan.org Git - aspectj.git/commitdiff
simplify signature processing and remove implicit extends
authoracolyer <acolyer>
Fri, 8 Jul 2005 16:05:19 +0000 (16:05 +0000)
committeracolyer <acolyer>
Fri, 8 Jul 2005 16:05:19 +0000 (16:05 +0000)
weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java

index 38f086f4ea3ab983d4b79929cf19788ed4e1b1cb..91fde77c56ab3fdca642e352876e327023388ef0 100644 (file)
@@ -16,34 +16,25 @@ package org.aspectj.weaver;
  */
 public class TypeVariableReferenceType extends BoundedReferenceType {
 
-       private String name;
-       
-       public TypeVariableReferenceType(
-                       String aTypeVariableName,
-                       ReferenceType aBound,
-                       boolean isExtends,
-                       World aWorld
-                       ) {
-               super(aBound,isExtends,aWorld);
-               this.name = aTypeVariableName;
-       }
+       private TypeVariable typeVariable;
        
        public TypeVariableReferenceType(
                        TypeVariable aTypeVariable,
                        World aWorld) {
-               super((ReferenceType)aTypeVariable.getUpperBound(),true,aWorld);
-               this.name = aTypeVariable.getName();
-               if (aTypeVariable.getLowerBound() != null) {
-                       this.isExtends = false;
-                       this.isSuper = true;
-                       this.lowerBound = (ReferenceType) aTypeVariable.getLowerBound();
-               }
+               super(aTypeVariable.getUpperBound().getSignature(),aWorld);
+               this.typeVariable = aTypeVariable;
+               this.isExtends = false;
+               this.isSuper = false;
+               this.upperBound = (ReferenceType) aTypeVariable.getUpperBound();
+               this.lowerBound = (ReferenceType) aTypeVariable.getLowerBound();
                if (aTypeVariable.getAdditionalInterfaceBounds().length > 0) {
                        this.additionalInterfaceBounds = (ReferenceType[]) aTypeVariable.getAdditionalInterfaceBounds();
                }
+               setDelegate(new ReferenceTypeReferenceTypeDelegate((ReferenceType)aTypeVariable.getUpperBound()));
        }
        
-       public String getTypeVariableName() {
-               return name;
+       public TypeVariable getTypeVariable() {
+               return typeVariable;
        }
+       
 }