31 lines
1.1 KiB
Java
31 lines
1.1 KiB
Java
package de.dhbwstuttgart.target.generate;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
|
import de.dhbwstuttgart.syntaxtree.Method;
|
|
import de.dhbwstuttgart.typeinference.result.ResultSet;
|
|
|
|
import java.util.Set;
|
|
|
|
final class JavaGenerics extends GenerateGenerics {
|
|
JavaGenerics(ASTToTargetAST astToTargetAST, ResultSet constraints) {
|
|
super(astToTargetAST, constraints);
|
|
}
|
|
|
|
@Override
|
|
void generics(ClassOrInterface owner, Method method, Set<Pair> result, Set<TPH> referenced) {
|
|
eliminateCycles(result, referenced);
|
|
eliminateInfimaConnectedToReturnType(method, result, referenced);
|
|
eliminateInfima(result, referenced);
|
|
equalizeTypeVariables(result, referenced);
|
|
eliminateInnerTypeVariables(referenced, result);
|
|
}
|
|
|
|
@Override
|
|
void generics(ClassOrInterface classOrInterface, Set<Pair> result, Set<TPH> referenced) {
|
|
eliminateCycles(result, referenced);
|
|
eliminateInfima(result, referenced);
|
|
eliminateInnerTypeVariablesOfClass(classOrInterface, result, referenced);
|
|
equalizeTypeVariables(result, referenced);
|
|
}
|
|
}
|