private Pair<InferenceResult,InferenceResult> inferFromArguments(final AnnotatedTypeFactory typeFactory,final Set<AFConstraint> afArgumentConstraints,final Set<TypeVariable> targets){
  Set<TUConstraint> tuArgConstraints=afToTuConstraints(afArgumentConstraints,targets);
  addConstraintsBetweenTargets(tuArgConstraints,targets,false,typeFactory);
  ConstraintMap argConstraints=constraintMapBuilder.build(targets,tuArgConstraints,typeFactory);
  InferenceResult inferredFromArgEqualities=equalitiesSolver.solveEqualities(targets,argConstraints,typeFactory);
  Set<TypeVariable> remainingTargets=inferredFromArgEqualities.getRemainingTargets(targets,true);
  InferenceResult fromSupertypes=supertypesSolver.solveFromSupertypes(remainingTargets,argConstraints,typeFactory);
  InferenceResult fromSubtypes=subtypesSolver.solveFromSubtypes(remainingTargets,argConstraints,typeFactory);
  fromSupertypes.mergeSubordinate(fromSubtypes);
  return Pair.of(inferredFromArgEqualities,fromSupertypes);
}

private Pair < InferenceResult , InferenceResult > inferFromArguments ( final AnnotatedTypeFactory typeFactory , final Set < AFConstraint > afArgumentConstraints , final Set < TypeVariable > targets ) { Set < TUConstraint > tuArgConstraints = afToTuConstraints ( afArgumentConstraints , targets ) ; addConstraintsBetweenTargets ( tuArgConstraints , targets , false , typeFactory ) ; ConstraintMap argConstraints = constraintMapBuilder . build ( targets , tuArgConstraints , typeFactory ) ; InferenceResult inferredFromArgEqualities = equalitiesSolver . solveEqualities ( targets , argConstraints , typeFactory ) ; Set < TypeVariable > remainingTargets = inferredFromArgEqualities . getRemainingTargets ( targets , true ) ; InferenceResult fromSupertypes = supertypesSolver . solveFromSupertypes ( remainingTargets , argConstraints , typeFactory ) ; InferenceResult fromSubtypes = subtypesSolver . solveFromSubtypes ( remainingTargets , argConstraints , typeFactory ) ; fromSupertypes . mergeSubordinate ( fromSubtypes ) ; return Pair . of ( inferredFromArgEqualities , fromSupertypes ) ; }
step 2 . infer type arguments from the equality ( tisu ) and the supertype ( tsuperu ) constraints of the methods arguments .
