Polishing

This commit is contained in:
Sam Brannen
2023-06-01 14:31:55 +02:00
parent 5b471a5349
commit e8ab53e76d
4 changed files with 80 additions and 106 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import java.lang.reflect.Member;
import java.lang.reflect.Method;
/**
* Represent predefined {@linkplain Member members} groups.
* Predefined {@link Member} categories.
*
* @author Andy Clement
* @author Sebastien Deleuze
@@ -39,14 +39,14 @@ public enum MemberCategory {
/**
* A category that represents {@linkplain Class#getDeclaredFields() declared
* fields}, that is all fields defined by the class, but not inherited ones.
* fields}: all fields defined by the class but not inherited fields.
* @see Class#getDeclaredFields()
*/
DECLARED_FIELDS,
/**
* A category that defines public {@linkplain Constructor constructors} can
* be introspected, but not invoked.
* be introspected but not invoked.
* @see Class#getConstructors()
* @see ExecutableMode#INTROSPECT
*/
@@ -54,7 +54,7 @@ public enum MemberCategory {
/**
* A category that defines {@linkplain Class#getDeclaredConstructors() all
* constructors} can be introspected, but not invoked.
* constructors} can be introspected but not invoked.
* @see Class#getDeclaredConstructors()
* @see ExecutableMode#INTROSPECT
*/
@@ -78,7 +78,7 @@ public enum MemberCategory {
/**
* A category that defines public {@linkplain Method methods}, including
* inherited ones can be introspect, but not invoked.
* inherited ones, can be introspected but not invoked.
* @see Class#getMethods()
* @see ExecutableMode#INTROSPECT
*/
@@ -86,7 +86,7 @@ public enum MemberCategory {
/**
* A category that defines {@linkplain Class#getDeclaredMethods() all
* methods}, excluding inherited ones can be introspected, but not invoked.
* methods}, excluding inherited ones, can be introspected but not invoked.
* @see Class#getDeclaredMethods()
* @see ExecutableMode#INTROSPECT
*/
@@ -94,7 +94,7 @@ public enum MemberCategory {
/**
* A category that defines public {@linkplain Method methods}, including
* inherited ones can be invoked.
* inherited ones, can be invoked.
* @see Class#getMethods()
* @see ExecutableMode#INVOKE
*/
@@ -102,7 +102,7 @@ public enum MemberCategory {
/**
* A category that defines {@linkplain Class#getDeclaredMethods() all
* methods}, excluding inherited ones can be invoked.
* methods}, excluding inherited ones, can be invoked.
* @see Class#getDeclaredMethods()
* @see ExecutableMode#INVOKE
*/
@@ -110,16 +110,18 @@ public enum MemberCategory {
/**
* A category that represents public {@linkplain Class#getClasses() inner
* classes}. Contrary to other categories, this does not register any
* particular reflection for them but rather make sure they are available
* classes}.
* <p>Contrary to other categories, this does not register any particular
* reflection for inner classes but rather makes sure they are available
* via a call to {@link Class#getClasses}.
*/
PUBLIC_CLASSES,
/**
* A category that represents all {@linkplain Class#getDeclaredClasses()
* inner classes}. Contrary to other categories, this does not register any
* particular reflection for them but rather make sure they are available
* inner classes}.
* <p>Contrary to other categories, this does not register any particular
* reflection for inner classes but rather makes sure they are available
* via a call to {@link Class#getDeclaredClasses}.
*/
DECLARED_CLASSES;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,15 +33,16 @@ public abstract class NativeDetector {
private static final boolean inNativeImage = (imageCode != null);
/**
* Returns {@code true} if running in a native image context (for example {@code buildtime}, {@code runtime} or
* {@code agent}) expressed by setting {@code org.graalvm.nativeimage.imagecode} system property to any value, else {@code false}.
* Returns {@code true} if running in a native image context (for example
* {@code buildtime}, {@code runtime}, or {@code agent}) expressed by setting the
* {@code org.graalvm.nativeimage.imagecode} system property to any value.
*/
public static boolean inNativeImage() {
return inNativeImage;
}
/**
* Returns {@code true} if running in any of the specified native image context(s), else {@code false}.
* Returns {@code true} if running in any of the specified native image context(s).
* @param contexts the native image context(s)
* @since 6.0.10
*/
@@ -55,8 +56,8 @@ public abstract class NativeDetector {
}
/**
* Native image context as defined in
* <a href="https://github.com/oracle/graal/blob/master/sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/ImageInfo.java">ImageInfo.java</a>.
* Native image context as defined in GraalVM's
* <a href="https://github.com/oracle/graal/blob/master/sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/ImageInfo.java">ImageInfo</a>.
*
* @since 6.0.10
*/
@@ -82,6 +83,7 @@ public abstract class NativeDetector {
public String toString() {
return this.key;
}
}
}