code: public JvmTypeReference typeRef(JvmType type, JvmTypeReference... typeArgs) {
  		int typeParams = 0;
  		if (type instanceof JvmGenericType) {
  			typeParams = ((JvmGenericType) type).getTypeParameters().size();
  		}
  		if (typeParams < typeArgs.length) {
  			throw new IllegalArgumentException("The type "+type.getIdentifier()+" only declares "+typeParams+" type parameters. You passed "+typeArgs.length+".");
  		}
  		LightweightTypeReference reference = typeReferenceOwner.toPlainTypeReference(type);
  		for (JvmTypeReference jvmTypeReference : typeArgs) {
  			((ParameterizedTypeReference)reference).addTypeArgument(typeReferenceOwner.toLightweightTypeReference(jvmTypeReference));
  		}
  		return reference.toJavaCompliantTypeReference();
  	}
docs: Creates a new {@link JvmTypeReference} pointing to the given class and containing the given type arguments.
  
  @param type
  the type the reference shall point to.
  @param typeArgs
  type arguments
  @return the newly created {@link JvmTypeReference}