diff --git a/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java b/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java index 48e72fc3..3cad91fd 100644 --- a/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java +++ b/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java @@ -37,7 +37,8 @@ public final class ConstraintsGenerationUtils * @return The same instance {@code constraints} provided including the merged * constraints */ - public static ConstraintSet generateAndMergeConstraints (Map tphMap, + public static ConstraintSet generateAndMergeConstraints ( + Map tphMap, ConstraintSet constraints) { ConstraintSet generateConstraints = ConstraintsGenerationUtils.generateConstraints(tphMap); constraints.addAll(generateConstraints); @@ -51,7 +52,7 @@ public final class ConstraintsGenerationUtils * @return {@link ConstraintSet} of {@link Pair} containing the constraints to * infer the matching wildcard type. */ - public static ConstraintSet generateConstraints (Map tphMap) { + public static ConstraintSet generateConstraints (Map tphMap) { ConstraintSet constraintSet = new ConstraintSet<>(); tphMap.forEach( (tph, refType) -> { ConstraintSet constraintSet2 = generateConstraints(refType, tph); diff --git a/src/main/java/de/dhbwstuttgart/inferWildcards/JavaTXCompilerWildcards.java b/src/main/java/de/dhbwstuttgart/inferWildcards/JavaTXCompilerWildcards.java index 0239d97d..ea9de26f 100644 --- a/src/main/java/de/dhbwstuttgart/inferWildcards/JavaTXCompilerWildcards.java +++ b/src/main/java/de/dhbwstuttgart/inferWildcards/JavaTXCompilerWildcards.java @@ -33,7 +33,7 @@ public class JavaTXCompilerWildcards /** * Generated Type placeholder and the implementation type represented. */ - private final Map tphMap; + private final Map tphMap; public JavaTXCompilerWildcards (File... sourceFile) throws IOException, ClassNotFoundException { super(sourceFile); @@ -56,6 +56,15 @@ public class JavaTXCompilerWildcards this.tphMap = TypePlaceholderReplaceUtils.generateTypePlaceholder(this); } + /** + * Return the Type Placeholder generated. + * + * @return {@link Map} over {@link TypePlaceholder} and {@link RefType} + */ + public Map getTphMap () { + return tphMap; + } + @Override public ConstraintSet getConstraints () throws ClassNotFoundException, IOException { ConstraintSet constraints = super.getConstraints(); diff --git a/src/main/java/de/dhbwstuttgart/inferWildcards/ReplaceTypeparamVisitor.java b/src/main/java/de/dhbwstuttgart/inferWildcards/ReplaceTypeparamVisitor.java index 8f77f132..10d64406 100644 --- a/src/main/java/de/dhbwstuttgart/inferWildcards/ReplaceTypeparamVisitor.java +++ b/src/main/java/de/dhbwstuttgart/inferWildcards/ReplaceTypeparamVisitor.java @@ -89,7 +89,7 @@ public class ReplaceTypeparamVisitor * * @return {@link Map} of {@link TypePlaceholder} and {@link RefType} */ - public Map getTphMap () { + public Map getTphMap () { return tphMap; } } diff --git a/src/main/java/de/dhbwstuttgart/inferWildcards/TypePlaceholderReplaceUtils.java b/src/main/java/de/dhbwstuttgart/inferWildcards/TypePlaceholderReplaceUtils.java index 7db70f6b..7d185a51 100644 --- a/src/main/java/de/dhbwstuttgart/inferWildcards/TypePlaceholderReplaceUtils.java +++ b/src/main/java/de/dhbwstuttgart/inferWildcards/TypePlaceholderReplaceUtils.java @@ -30,7 +30,7 @@ public final class TypePlaceholderReplaceUtils * @return {@link Map} over {@link TypePlaceholder} and the {@link RefType} * replaced */ - public static Map generateTypePlaceholder (JavaTXCompiler compiler) { + public static Map generateTypePlaceholder (JavaTXCompiler compiler) { Map sourceFiles = compiler.getSourceFiles(); ReplaceTypeparamVisitor visitor = new ReplaceTypeparamVisitor(); sourceFiles.forEach( (k, v) -> v.accept(visitor));