forked from JavaTX/JavaCompilerCore
TypeVar zu subtype von TypePlaceholder gemacht
This commit is contained in:
parent
f48bb2ac0c
commit
ce220abaf5
@ -2,31 +2,30 @@ package de.dhbwstuttgart.strucTypes5.typeVars;
|
||||
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
||||
|
||||
/**
|
||||
* Created by sebastian on 14.04.17.
|
||||
*/
|
||||
public class TypeVar extends RefTypeOrTPHOrWildcardOrGeneric {
|
||||
public class TypeVar extends TypePlaceholder {
|
||||
|
||||
private String id;
|
||||
//private String id;
|
||||
|
||||
public TypeVar(String id) {
|
||||
super();
|
||||
this.id = id;
|
||||
super(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("TVar_%s" , id);
|
||||
return String.format("TVar_%s" , this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj.getClass().equals(TypeVar.class)) {
|
||||
TypeVar t = (TypeVar) obj;
|
||||
if (t.id.equals(id)) {
|
||||
if (t.getName().equals(this.getName())) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
@ -3,7 +3,7 @@ package de.dhbwstuttgart.strucTypes5.typeVars;
|
||||
import de.dhbwstuttgart.strucTypes5.constraints.InterfaceForConstraint;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
/**
|
||||
/** LOESCHEN
|
||||
* Created by sebastian on 30.04.17.
|
||||
*/
|
||||
public class TypeVarInterface extends RefTypeOrTPHOrWildcardOrGeneric {
|
||||
|
@ -4,7 +4,7 @@ package de.dhbwstuttgart.strucTypes5.typeVars;
|
||||
import de.dhbwstuttgart.strucTypes4.syntaxtree.Class;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||
|
||||
/**
|
||||
/**LOESCHEN
|
||||
* Created by sebastian on 14.04.17.
|
||||
*/
|
||||
public class TypeVarType extends RefTypeOrTPHOrWildcardOrGeneric {
|
||||
|
@ -18,9 +18,17 @@ public class TypePlaceholder extends RefTypeOrTPHOrWildcardOrGeneric
|
||||
|
||||
private static Hashtable<String, TypePlaceholder> m_TypePlaceholdersRegistry = new Hashtable<String, TypePlaceholder>();
|
||||
|
||||
private final String name;
|
||||
|
||||
final String name;
|
||||
|
||||
/**
|
||||
* Protected Konstruktor - nur noetig für TypVar
|
||||
* <br>Author: Martin Pluemicke
|
||||
*/
|
||||
protected TypePlaceholder(String name)
|
||||
{
|
||||
super(null);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Privater Konstruktor - Eine TypePlaceholder-Variable wird �ber die
|
||||
|
Loading…
Reference in New Issue
Block a user