package be.kuleuven.cs.distrinet.jnome.core.type;

import org.aikodi.chameleon.oo.type.Type;
import org.aikodi.chameleon.oo.type.generics.FormalTypeParameter;
import org.aikodi.chameleon.oo.type.generics.TypeVariable;

public class JavaTypeVariable extends TypeVariable implements JavaType {

  public JavaTypeVariable(String name, Type aliasedType, FormalTypeParameter param) {
    super(name, aliasedType, param);
  }

  @Override
  public Type erasure() {
    return this;
  }
  
  @Override
  public TypeVariable cloneSelf() {
    return new JavaTypeVariable(name(), indirectionTarget(), parameter());
  }

  // 
//  @Override
//  public boolean uniSupertypeOf(Type other, TypeFixer trace) throws LookupException {
//    if(trace.contains(other, parameter())) {
//      return true;
//    }
//    trace.add(other, parameter());
//    return other.subtypeOf(aliasedType(), trace);
//  }

//  @Override
//  public Type upperBound() throws LookupException {
//    return parameter().upperBound();
//  }
//
//  @Override
//  public Type lowerBound() throws LookupException {
//    return parameter().lowerBound();
//  }
}

@@ -44,16 +44,86 @@
 .type;%0A%0A
+import java.util.List;%0A%0Aimport org.aikodi.chameleon.oo.member.Member;%0A
 import o
@@ -156,16 +156,16 @@
 e.Type;%0A
-
 import o
@@ -282,16 +282,65 @@
 iable;%0A%0A
+import com.google.common.collect.ImmutableList;%0A%0A
 public c
@@ -723,16 +723,349 @@
 );%0A  %7D%0A%0A
+  @Override%0A  public List%3CMember%3E implicitMembers() %7B%0A  %09if(_implicits == null) %7B%0A  %09%09synchronized(this) %7B%0A  %09  %09if(_implicits == null) %7B%0A  %09  %09%09_implicits = ImmutableList.%3CMember%3Ebuilder().add(AbstractJavaType.getClassMethod(this)).build();%0A  %09  %09%7D  %09%09%09%0A  %09%09%7D%0A  %09%7D%0A  %09return _implicits;%0A  %7D%0A  %0A  private List%3CMember%3E _implicits;%0A  %0A
   // %0A//

Add the getClass() method to ensure the proper return type and avoid overriding problems.