3333
3434/**
3535 * Base definition of a compiler that can be configured to perform a compilation run against
36- * sources. This is designed to provide functionality that {@code javac} does by default, for JDK
37- * 17.
36+ * sources.
37+ *
38+ * <p>JctCompiler objects are often a nexus that will manage configuring an underlying JSR-199
39+ * compiler internally in a platform agnostic way.
3840 *
3941 * @author Ashley Scopes
4042 * @since 0.0.1
@@ -595,6 +597,8 @@ default JctCompiler addCompilerOptions(String compilerOption, String... compiler
595597 *
596598 * @param release the version to set.
597599 * @return this compiler object for further call chaining.
600+ * @throws IllegalArgumentException if the version is less than 0.
601+ * @throws UnsupportedOperationException if the compiler does not support integer versions.
598602 */
599603 default JctCompiler release (int release ) {
600604 if (release < 0 ) {
@@ -618,6 +622,7 @@ default JctCompiler release(int release) {
618622 *
619623 * @param release the version to set.
620624 * @return this compiler object for further call chaining.
625+ * @throws UnsupportedOperationException if the compiler does not support integer versions.
621626 */
622627 default JctCompiler release (SourceVersion release ) {
623628 return release (Integer .toString (release .ordinal ()));
@@ -634,7 +639,8 @@ default JctCompiler release(SourceVersion release) {
634639 * @return this compiler object for further call chaining.
635640 * @since 1.1.0
636641 * @throws UnsupportedOperationException if the current JVM version does not
637- * correspond to a supported Jave release version in the compiler.
642+ * correspond to a supported Jave release version in the compiler, or if the
643+ * compiler does not support integral version numbers.
638644 */
639645 @ API (since = "1.1.0" , status = Status .STABLE )
640646 default JctCompiler useRuntimeRelease () {
@@ -685,6 +691,9 @@ default JctCompiler useRuntimeRelease() {
685691 *
686692 * @param source the version to set.
687693 * @return this compiler object for further call chaining.
694+ * @throws IllegalArgumentException if the version is less than 0.
695+ * @throws UnsupportedOperationException if the compiler does not
696+ * support integer versions.
688697 */
689698 default JctCompiler source (int source ) {
690699 if (source < 0 ) {
@@ -709,6 +718,7 @@ default JctCompiler source(int source) {
709718 *
710719 * @param source the version to set.
711720 * @return this compiler object for further call chaining.
721+ * @throws UnsupportedOperationException if the compiler does not support integer versions.
712722 */
713723 default JctCompiler source (SourceVersion source ) {
714724 return source (Integer .toString (source .ordinal ()));
@@ -757,6 +767,8 @@ default JctCompiler source(SourceVersion source) {
757767 *
758768 * @param target the version to set.
759769 * @return this compiler object for further call chaining.
770+ * @throws IllegalArgumentException if the version is less than 0.
771+ * @throws UnsupportedOperationException if the compiler does not support integer versions.
760772 */
761773 default JctCompiler target (int target ) {
762774 if (target < 0 ) {
@@ -781,6 +793,7 @@ default JctCompiler target(int target) {
781793 *
782794 * @param target the version to set.
783795 * @return this compiler object for further call chaining.
796+ * @throws UnsupportedOperationException if the compiler does not support integer versions.
784797 */
785798 default JctCompiler target (SourceVersion target ) {
786799 return target (Integer .toString (target .ordinal ()));
0 commit comments