From 158ae51be0fa5e8f90ad534df3e4f07745a443dc Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Wed, 30 Oct 2024 05:58:22 +0000 Subject: [PATCH] 8250659: Clarify in ParameterizedType.getRawType() doc that only Class is returned Reviewed-by: darcy --- .../java/lang/reflect/ParameterizedType.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/java.base/share/classes/java/lang/reflect/ParameterizedType.java b/src/java.base/share/classes/java/lang/reflect/ParameterizedType.java index 99016623a3e..c78af9ef2ec 100644 --- a/src/java.base/share/classes/java/lang/reflect/ParameterizedType.java +++ b/src/java.base/share/classes/java/lang/reflect/ParameterizedType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,11 +66,15 @@ public interface ParameterizedType extends Type { Type[] getActualTypeArguments(); /** - * Returns the {@code Type} object representing the class or interface - * that declared this type. + * {@return the {@code Type} object representing the class or interface + * that declared this type} + * + * @apiNote + * All {@code ParameterizedType} objects from core reflection return a + * {@link Class}. The static {@code Type} return type allows other + * implementations to represent classes and interfaces not in the current + * runtime. * - * @return the {@code Type} object representing the class or interface - * that declared this type * @since 1.5 */ Type getRawType();