code: @Nullable
      public final Target findTargetFor(@Nullable final String targetPath) {
          if (targets == null) {
              return null;
          }
          if (targetPath == null) {
              return null;
          }
          for (final Target target : targets) {
              if (target.matches(targetPath)) {
                  return target;
              }
          }
          return null;
      }
docs: Returns the first target that matched the given path based on the defined patterns. Returns null if the argument is
  <code>null</code>.
  
  @param targetPath
  Path to find.
  
  @return Target.