Skip to content

Commit 7d20de7

Browse files
committed
Move AnnotationFeature documentation to class level
1 parent 2133be6 commit 7d20de7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/annotation/AnnotationFeature.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
import com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl;
3939
import com.oracle.svm.hosted.reflect.ReflectionDataBuilder;
4040

41+
/**
42+
* For annotations that are materialized at image run time, all necessary methods are registered for
43+
* reflection in {@link ReflectionDataBuilder#registerTypesForAnnotation}. But if an annotation type
44+
* is only used by an annotation that is already in the image heap, then we need to also register
45+
* its methods for reflection. This is done here by registering a callback which notifies us for
46+
* every reachable {@link Annotation} object in the heap and then checking if it is an annotation
47+
* that was materialized by the JDK, i.e., it is a {@link Proxy}.
48+
*/
4149
@AutomaticallyRegisteredFeature
4250
public class AnnotationFeature implements InternalFeature {
4351

@@ -49,14 +57,6 @@ public void duringSetup(DuringSetupAccess a) {
4957
access.registerObjectReachableCallback(Annotation.class, this::registerDeclaredMethods);
5058
}
5159

52-
/**
53-
* For annotations that are materialized at image run time, all necessary methods are registered
54-
* for reflection in {@link ReflectionDataBuilder#registerTypesForAnnotation}. But if an
55-
* annotation type is only used by an annotation that is already in the image heap, then we need
56-
* to also register its methods for reflection. This is done here by registering a callback
57-
* which notifies us for every reachable {@link Annotation} object in the heap and then checking
58-
* if it is an annotation that was materialized by the JDK, i.e., it is a {@link Proxy}.
59-
*/
6060
@SuppressWarnings("unused")
6161
private void registerDeclaredMethods(DuringAnalysisAccess access, Annotation annotation, ObjectScanner.ScanReason reason) {
6262
if (Proxy.isProxyClass(annotation.getClass())) {

0 commit comments

Comments
 (0)