public Collection < Dependency > getDependencies ( Key < ? > typeKey , MethodLiteral < ? , ? > method ) { String context ; if ( method . isConstructor ( ) ) { context = "@Inject constructor of " + method . getDeclaringType ( ) ; } else if ( typeKey == Dependency . GINJECTOR ) { context = "Member injector " + method ; } else { context = "Member injection via " + method ; } Set < Dependency > required = new LinkedHashSet < Dependency > ( ) ; for ( Key < ? > key : method . getParameterKeys ( ) ) { required . add ( new Dependency ( typeKey , key , isOptional ( method ) , false , context ) ) ; } return required ; }
Collects and returns all keys required to inject the given method .