code: public static final ParameterizedType parameterizeWithOwner(final Type owner, final Class<?> raw,
          final Type... typeArguments) {
          Validate.notNull(raw, "raw class is null");
          final Type useOwner;
          if (raw.getEnclosingClass() == null) {
              Validate.isTrue(owner == null, "no owner allowed for top-level %s", raw);
              useOwner = null;
          } else if (owner == null) {
              useOwner = raw.getEnclosingClass();
          } else {
              Validate.isTrue(TypeUtils.isAssignable(owner, raw.getEnclosingClass()),
                  "%s is invalid owner type for parameterized %s", owner, raw);
              useOwner = owner;
          }
          Validate.noNullElements(typeArguments, "null type argument at index %s");
          Validate.isTrue(raw.getTypeParameters().length == typeArguments.length,
              "invalid number of type parameters specified: expected %d, got %d", raw.getTypeParameters().length,
              typeArguments.length);
  
          return new ParameterizedTypeImpl(raw, useOwner, typeArguments);
      }
docs: Create a parameterized type instance.
  
  @param owner the owning type
  @param raw the raw class to create a parameterized type instance for
  @param typeArguments the types used for parameterization
  
  @return {@link ParameterizedType}
  @since 3.2