1717package org .springframework .nativex ;
1818
1919/**
20- * Options for Spring Native.
20+ * AOT options for Spring Native.
2121 *
2222 * @author Sebastien Deleuze
2323 * @author Andy Clement
@@ -26,22 +26,8 @@ public class AotOptions {
2626
2727 private String mode = Mode .NATIVE .toString ();
2828
29- /**
30- * Determine if extra debug should come out related to verification of reflection requests.
31- * Spring Native will compute configuration but a final stage verification runs before it is
32- * written out to try and ensure what is requested will not lead to problems when the
33- * native-image is built. This flag enables debugging of that final stage verification.
34- */
3529 private boolean debugVerify ;
3630
37- /**
38- * Determine whether to check Spring components are suitable for inclusion in a native-image.
39- * For a concrete example, verification currently checks whether bean factory methods are being
40- * invoked directly in configuration classes. If they are then that must be enforced by using
41- * CGLIB proxies. CGLIB proxies are not supported in native-image and so a verification error
42- * will come out with a message indicating the code should switch to method parameter
43- * injection (allowing Spring to control bean method invocation).
44- */
4531 private boolean verify = true ;
4632
4733 private boolean removeYamlSupport ;
@@ -52,63 +38,116 @@ public class AotOptions {
5238
5339 private boolean removeSpelSupport ;
5440
55-
41+ /**
42+ * Should be either {@code native} or {@code native-agent}
43+ * @see #toMode()
44+ */
5645 public String getMode () {
5746 return mode ;
5847 }
5948
49+ /**
50+ * @see #getMode()
51+ */
6052 public void setMode (String mode ) {
6153 this .mode = mode ;
6254 }
6355
56+ /**
57+ * Determine whether to check Spring components are suitable for inclusion in a native-image.
58+ * For a concrete example, verification currently checks whether bean factory methods are being
59+ * invoked directly in configuration classes. If they are then that must be enforced by using
60+ * CGLIB proxies. CGLIB proxies are not supported in native-image and so a verification error
61+ * will come out with a message indicating the code should switch to method parameter
62+ * injection (allowing Spring to control bean method invocation).
63+ */
6464 public boolean isVerify () {
6565 return verify ;
6666 }
6767
68+ /**
69+ * @see #isVerify()
70+ */
6871 public void setVerify (boolean verify ) {
6972 this .verify = verify ;
7073 }
7174
75+ /**
76+ * Removes Spring Boot Yaml support to optimize the footprint when set to {@code true}.
77+ */
7278 public boolean isRemoveYamlSupport () {
7379 return removeYamlSupport ;
7480 }
7581
82+ /**
83+ * @see #isRemoveYamlSupport()
84+ */
7685 public void setRemoveYamlSupport (boolean removeYamlSupport ) {
7786 this .removeYamlSupport = removeYamlSupport ;
7887 }
7988
89+ /**
90+ * Removes Spring Boot JMX support to optimize the footprint when set to {@code true}.
91+ */
8092 public boolean isRemoveJmxSupport () {
8193 return removeJmxSupport ;
8294 }
8395
96+ /**
97+ * @see #isRemoveJmxSupport()
98+ */
8499 public void setRemoveJmxSupport (boolean removeJmxSupport ) {
85100 this .removeJmxSupport = removeJmxSupport ;
86101 }
87102
103+ /**
104+ * Determine if extra debug should come out related to verification of reflection requests.
105+ * Spring Native will compute configuration but a final stage verification runs before it is
106+ * written out to try and ensure what is requested will not lead to problems when the
107+ * native-image is built. This flag enables debugging of that final stage verification.
108+ */
88109 public boolean isDebugVerify () {
89110 return debugVerify ;
90111 }
91112
113+ /**
114+ * @see #isDebugVerify()
115+ */
92116 public void setDebugVerify (boolean debugVerify ) {
93117 this .debugVerify = debugVerify ;
94118 }
95119
120+ /**
121+ * Removes Spring XML support (XML converters, codecs and XML application context support) when set to {@code true}.
122+ */
96123 public boolean isRemoveXmlSupport () {
97124 return removeXmlSupport ;
98125 }
99126
127+ /**
128+ * @see #isRemoveXmlSupport()
129+ */
100130 public void setRemoveXmlSupport (boolean removeXmlSupport ) {
101131 this .removeXmlSupport = removeXmlSupport ;
102132 }
103133
134+ /**
135+ * Removes Spring SpEL support to optimize the footprint when set to {@code true}.
136+ */
104137 public boolean isRemoveSpelSupport () {
105138 return removeSpelSupport ;
106139 }
107140
141+ /**
142+ * @see #isRemoveSpelSupport()
143+ */
108144 public void setRemoveSpelSupport (boolean removeSpelSupport ) {
109145 this .removeSpelSupport = removeSpelSupport ;
110146 }
111147
148+ /**
149+ * Turn {@link #mode} to a {@link Mode}.
150+ */
112151 public Mode toMode () {
113152 if (this .mode == null || this .mode .equals (Mode .NATIVE .toString ())) {
114153 return Mode .NATIVE ;
0 commit comments