Skip to content

Commit 4763877

Browse files
committed
Merge branch '6.2.x'
2 parents d888432 + e9dc6be commit 4763877

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

spring-core/src/main/java/org/springframework/aot/hint/MemberCategory.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,22 +32,22 @@
3232
public enum MemberCategory {
3333

3434
/**
35-
* A category that represents introspection on public {@linkplain Field fields}.
36-
* @deprecated with no replacement since introspection is included
37-
* when {@link ReflectionHints#registerType(Class, MemberCategory...) adding a reflection hint for a type}.
38-
* Use {@link #INVOKE_PUBLIC_FIELDS} if getting/setting field values is required.
39-
* @see Class#getFields()
35+
* A category that represents reflective field access on public {@linkplain Field fields}.
36+
* @deprecated in favor of @link #INVOKE_PUBLIC_FIELDS} with similar semantics.
37+
* @see Field#get(Object)
38+
* @see Field#set(Object, Object)
4039
*/
4140
@Deprecated(since = "7.0", forRemoval = true)
4241
PUBLIC_FIELDS,
4342

4443
/**
45-
* A category that represents introspection on {@linkplain Class#getDeclaredFields() declared
46-
* fields}: all fields defined by the class but not inherited fields.
47-
* @deprecated with no replacement since introspection is included
48-
* when {@link ReflectionHints#registerType(Class, MemberCategory...) adding a reflection hint for a type}.
49-
* Use {@link #INVOKE_DECLARED_FIELDS} if getting/setting field values is required.
44+
* A category that represents reflective field access on
45+
* {@linkplain Class#getDeclaredFields() declared fields}: all fields defined by the
46+
* class but not inherited fields.
47+
* @deprecated in favor of @link #INVOKE_DECLARED_FIELDS} with similar semantics.
5048
* @see Class#getDeclaredFields()
49+
* @see Field#get(Object)
50+
* @see Field#set(Object, Object)
5151
*/
5252
@Deprecated(since = "7.0", forRemoval = true)
5353
DECLARED_FIELDS,

spring-core/src/main/java/org/springframework/aot/hint/ReflectionHints.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -198,8 +198,8 @@ public ReflectionHints registerForInterfaces(Class<?> type, Consumer<TypeHint.Bu
198198
}
199199

200200
/**
201-
* Register the need for reflection on the specified {@link Field}.
202-
* @param field the field that requires reflection
201+
* Register the need for reflective field access on the specified {@link Field}.
202+
* @param field the field that requires reflective access
203203
* @return {@code this}, to facilitate method chaining
204204
*/
205205
public ReflectionHints registerField(Field field) {

spring-core/src/main/java/org/springframework/aot/hint/TypeHint.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,11 @@ public Builder onReachableType(Class<?> reachableType) {
180180
}
181181

182182
/**
183-
* Register the need for reflection on the field with the specified name.
183+
* Register the need for reflective access on the field with the specified name.
184184
* @param name the name of the field
185185
* @return {@code this}, to facilitate method chaining
186+
* @see java.lang.reflect.Field#get(Object)
187+
* @see java.lang.reflect.Field#set(Object, Object)
186188
*/
187189
public Builder withField(String name) {
188190
this.fields.add(name);

spring-core/src/main/java/org/springframework/aot/hint/predicate/ReflectionHintsPredicates.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,7 @@ public Predicate<RuntimeHints> onFieldInvocation(String className, String fieldN
290290
}
291291

292292
/**
293-
* Return a predicate that checks whether a reflection hint is registered for the given field.
294-
* By default, unsafe or write access is not considered.
295-
* <p>The returned type exposes additional methods that refine the predicate behavior.
293+
* Return a predicate that checks whether a reflective field access hint is registered for the given field.
296294
* @param field the field
297295
* @return the {@link RuntimeHints} predicate
298296
* @deprecated since 7.0 in favor of {@link #onFieldInvocation(Field)}

0 commit comments

Comments
 (0)