forked from JavaTX/JavaCompilerCore
30 lines
1.0 KiB
Java
30 lines
1.0 KiB
Java
package asp;
|
|
|
|
import de.dhbwstuttgart.parser.NullToken;
|
|
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
|
import de.dhbwstuttgart.syntaxtree.factory.ASTFactory;
|
|
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
|
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
|
import de.dhbwstuttgart.typeinference.constraints.Pair;
|
|
import de.dhbwstuttgart.typeinference.unify.model.PairOperator;
|
|
|
|
import java.util.Collection;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
public class UnifyWithoutWildcards {
|
|
|
|
public Collection<ClassOrInterface> getFC() {
|
|
Set<ClassOrInterface> ret = new HashSet<>();
|
|
ret.add(ASTFactory.createObjectClass());
|
|
ret.add(ASTFactory.createClass(java.util.List.class));
|
|
return ret;
|
|
}
|
|
|
|
public ConstraintSet<Pair> getPairs() {
|
|
ConstraintSet<Pair> ret = new ConstraintSet<>();
|
|
ret.addUndConstraint(new Pair(TypePlaceholder.fresh(new NullToken()), ASTFactory.createObjectType(), PairOperator.SMALLERDOT));
|
|
return ret;
|
|
}
|
|
}
|