code: static Class<?> getTypeFromMember(Member member) throws InjectionException {
          Class<?> memberType = null;
          if (member instanceof Field) {
              memberType = ((Field) member).getType();
          } else if (member instanceof Method) {
              Method method = (Method) member;
              if (method.getParameterTypes() == null || method.getParameterTypes().length != 1) {
                  String msg = Tr.formatMessage(tc, "error.service.ref.member.level.annotation.wrong.method.name",
                                                method.getName(), method.getDeclaringClass().getName());
                  throw new InjectionException(msg);
              }
              memberType = method.getParameterTypes()[0];
          }
          return memberType;
      }
docs: This returns the type of the injection being requested based on either the
  annotated field or annotated method.