Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Jun 1, 2023
1 parent 5b471a5 commit e8ab53e
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

STOMP over WebSocket support is available in the `spring-messaging` and
`spring-websocket` modules. Once you have those dependencies, you can expose a STOMP
endpoints, over WebSocket with xref:web/websocket/fallback.adoc[SockJS Fallback], as the following example shows:
endpoint over WebSocket with xref:web/websocket/fallback.adoc[SockJS Fallback], as the following example shows:

[source,java,indent=0,subs="verbatim,quotes"]
----
Expand Down Expand Up @@ -32,7 +32,7 @@ client needs to connect for the WebSocket handshake.
<2> STOMP messages whose destination header begins with `/app` are routed to
`@MessageMapping` methods in `@Controller` classes.
<3> Use the built-in message broker for subscriptions and broadcasting and
route messages whose destination header begins with `/topic `or `/queue` to the broker.
route messages whose destination header begins with `/topic` or `/queue` to the broker.


The following example shows the XML configuration equivalent of the preceding example:
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -22,7 +22,7 @@
import java.lang.reflect.Method;

/**
* Represent predefined {@linkplain Member members} groups.
* Predefined {@link Member} categories.
*
* @author Andy Clement
* @author Sebastien Deleuze
Expand All @@ -39,22 +39,22 @@ 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
*/
INTROSPECT_PUBLIC_CONSTRUCTORS,

/**
* 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
*/
Expand All @@ -78,48 +78,50 @@ 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
*/
INTROSPECT_PUBLIC_METHODS,

/**
* 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
*/
INTROSPECT_DECLARED_METHODS,

/**
* 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
*/
INVOKE_PUBLIC_METHODS,

/**
* 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
*/
INVOKE_DECLARED_METHODS,

/**
* 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
*/
Expand All @@ -55,8 +56,8 @@ public static boolean inNativeImage(Context... contexts) {
}

/**
* 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
*/
Expand All @@ -82,6 +83,7 @@ public enum Context {
public String toString() {
return this.key;
}

}

}
Loading

0 comments on commit e8ab53e

Please sign in to comment.