This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 9ad1836f69 Moving schema annotations into juneau-common
9ad1836f69 is described below
commit 9ad1836f6900d73f0cadb8a065b843f9ac91a6b6
Author: James Bognar <[email protected]>
AuthorDate: Tue Apr 14 07:50:17 2026 -0400
Moving schema annotations into juneau-common
---
.../juneau/commons/reflect/AnnotationInfo.java | 3 +-
.../org/apache/juneau/rest/annotation/Rest.java | 25 ---
.../juneau/rest/annotation/RestAnnotation.java | 52 +----
.../apache/juneau/rest/annotation/RestDelete.java | 11 -
.../rest/annotation/RestDeleteAnnotation.java | 22 +-
.../apache/juneau/rest/annotation/RestDestroy.java | 11 -
.../rest/annotation/RestDestroyAnnotation.java | 22 +-
.../apache/juneau/rest/annotation/RestEndCall.java | 11 -
.../rest/annotation/RestEndCallAnnotation.java | 22 +-
.../org/apache/juneau/rest/annotation/RestGet.java | 11 -
.../juneau/rest/annotation/RestGetAnnotation.java | 22 +-
.../apache/juneau/rest/annotation/RestInit.java | 11 -
.../juneau/rest/annotation/RestInitAnnotation.java | 22 +-
.../org/apache/juneau/rest/annotation/RestOp.java | 11 -
.../juneau/rest/annotation/RestOpAnnotation.java | 22 +-
.../apache/juneau/rest/annotation/RestOptions.java | 11 -
.../rest/annotation/RestOptionsAnnotation.java | 22 +-
.../apache/juneau/rest/annotation/RestPatch.java | 11 -
.../rest/annotation/RestPatchAnnotation.java | 22 +-
.../apache/juneau/rest/annotation/RestPost.java | 11 -
.../juneau/rest/annotation/RestPostAnnotation.java | 22 +-
.../juneau/rest/annotation/RestPostCall.java | 11 -
.../rest/annotation/RestPostCallAnnotation.java | 22 +-
.../juneau/rest/annotation/RestPostInit.java | 11 -
.../rest/annotation/RestPostInitAnnotation.java | 22 +-
.../apache/juneau/rest/annotation/RestPreCall.java | 11 -
.../rest/annotation/RestPreCallAnnotation.java | 22 +-
.../org/apache/juneau/rest/annotation/RestPut.java | 11 -
.../juneau/rest/annotation/RestPutAnnotation.java | 22 +-
.../juneau/rest/annotation/RestStartCall.java | 11 -
.../rest/annotation/RestStartCallAnnotation.java | 22 +-
.../rest/annotation/RestAnnotation_Test.java | 35 +---
.../rest/annotation/RestDeleteAnnotation_Test.java | 29 +--
.../annotation/RestDestroyAnnotation_Test.java | 31 +--
.../annotation/RestEndCallAnnotation_Test.java | 31 +--
.../rest/annotation/RestGetAnnotation_Test.java | 29 +--
.../rest/annotation/RestInitAnnotation_Test.java | 31 +--
.../rest/annotation/RestOpAnnotation_Test.java | 29 +--
.../rest/annotation/RestPostAnnotation_Test.java | 29 +--
.../annotation/RestPostCallAnnotation_Test.java | 31 +--
.../annotation/RestPostInitAnnotation_Test.java | 31 +--
.../annotation/RestPreCallAnnotation_Test.java | 31 +--
.../rest/annotation/RestPutAnnotation_Test.java | 29 +--
.../annotation/RestStartCallAnnotation_Test.java | 31 +--
todo/move-http-annotation-to-rest-common.md | 32 ++-
todo/xapply-annotation-split.md | 230 ---------------------
46 files changed, 90 insertions(+), 1111 deletions(-)
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java
index ad321b6ec7..be9bb3c155 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java
@@ -783,8 +783,7 @@ public class AnnotationInfo<T extends Annotation> {
*
* <h5 class='section'>Examples:</h5>
* <ul>
- * <li>{@code @Rest(on=MyClass)} - Annotation on a class
- * <li>{@code @RestGet(on=MyClass.myMethod)} - Annotation on a
method
+ * <li>{@code @Bean(on=MyClass)} - Annotation on a class
* <li>{@code @Inject(on=MyClass.myField)} - Annotation on a field
* <li>{@code @PackageAnnotation(on=my.package)} - Annotation on a
package
* </ul>
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
index 6bd80b68e0..d5e25d0d79 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
@@ -899,31 +899,6 @@ public @interface Rest {
*/
String messages() default "";
- /**
- * Dynamically apply this annotation to the specified classes.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
- /**
- * Dynamically apply this annotation to the specified classes.
- *
- * <p>
- * Identical to {@link #on()} except allows you to specify class
objects instead of a strings.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- Class<?>[] onClass() default {};
-
/**
* Specifies the parsers for converting HTTP request bodies into POJOs.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
index 116673a9ee..3e11f43976 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
@@ -67,7 +67,7 @@ public class RestAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderT {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private Class<? extends Encoder>[] encoders = new Class[0];
@@ -684,35 +684,6 @@ public class RestAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderT */
- public Builder on(Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from
AppliedOnClassAnnotationObject.Builder */
- public Builder onClass(Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderT */
- public Builder on(ClassInfo...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderT */
- public Builder onClass(ClassInfo...value) {
- super.onClass(value);
- return this;
- }
-
}
/**
@@ -800,7 +771,7 @@ public class RestAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedOnClassAnnotationObject
implements Rest {
+ private static class Object extends AnnotationObject implements Rest {
private final String[] description;
private final Class<? extends Encoder>[] encoders;
@@ -1191,23 +1162,4 @@ public class RestAnnotation {
return new Builder();
}
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static Builder create(Class<?>...on) {
- return create().on(on);
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static Builder create(String...on) {
- return create().on(on);
- }
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java
index 35d886bd34..d37d467a66 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java
@@ -411,17 +411,6 @@ public @interface RestDelete {
*/
Class<? extends RestMatcher>[] matchers() default {};
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
/**
* Optional path pattern for the specified method.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation.java
index a142cb64ac..d82517d04e 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation.java
@@ -58,7 +58,7 @@ public class RestDeleteAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private Class<? extends RestGuard>[] guards = new Class[0];
@@ -332,24 +332,6 @@ public class RestDeleteAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
/**
@@ -394,7 +376,7 @@ public class RestDeleteAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestDelete {
+ private static class Object extends AnnotationObject implements
RestDelete {
private final String[] description;
private final Class<? extends RestGuard>[] guards;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroy.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroy.java
index 62f4b8a306..85fa46be07 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroy.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroy.java
@@ -87,15 +87,4 @@ public @interface RestDestroy {
* @since 9.2.0
*/
String[] description() default {};
-
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation.java
index ea7d1b9445..8e2b51b0e3 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation.java
@@ -64,7 +64,7 @@ public class RestDestroyAnnotation {
* <li class='jm'>{@link
org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
@@ -95,30 +95,12 @@ public class RestDestroyAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder
on(org.apache.juneau.commons.reflect.MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestDestroy {
+ private static class Object extends AnnotationObject implements
RestDestroy {
private final String[] description;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCall.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCall.java
index e1ba734f22..1d604f2d23 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCall.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCall.java
@@ -100,15 +100,4 @@ public @interface RestEndCall {
* @since 9.2.0
*/
String[] description() default {};
-
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation.java
index 289492d4f4..247c4a8595 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation.java
@@ -64,7 +64,7 @@ public class RestEndCallAnnotation {
* <li class='jm'>{@link
org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
@@ -95,30 +95,12 @@ public class RestEndCallAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder
on(org.apache.juneau.commons.reflect.MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestEndCall {
+ private static class Object extends AnnotationObject implements
RestEndCall {
private final String[] description;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
index db9dd1b048..a0083bf998 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
@@ -432,17 +432,6 @@ public @interface RestGet {
*/
Class<? extends RestMatcher>[] matchers() default {};
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
/**
* Optional path pattern for the specified method.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGetAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGetAnnotation.java
index 3ab082dff5..8bdc04f3eb 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGetAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGetAnnotation.java
@@ -61,7 +61,7 @@ public class RestGetAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private Class<? extends RestConverter>[] converters = new
Class[0];
@@ -373,24 +373,6 @@ public class RestGetAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
/**
@@ -438,7 +420,7 @@ public class RestGetAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestGet {
+ private static class Object extends AnnotationObject implements RestGet
{
private final String[] description;
private final Class<? extends RestConverter>[] converters;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java
index 96e05f052a..54f65f6998 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java
@@ -92,15 +92,4 @@ public @interface RestInit {
* @since 9.2.0
*/
String[] description() default {};
-
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInitAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInitAnnotation.java
index 1b1c0f0d06..884863f257 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInitAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInitAnnotation.java
@@ -64,7 +64,7 @@ public class RestInitAnnotation {
* <li class='jm'>{@link
org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
@@ -95,30 +95,12 @@ public class RestInitAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder
on(org.apache.juneau.commons.reflect.MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestInit {
+ private static class Object extends AnnotationObject implements
RestInit {
private final String[] description;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
index 58d0ea1f43..b8bee8bb1b 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
@@ -574,17 +574,6 @@ public @interface RestOp {
*/
String method() default "";
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
/**
* Specifies the parsers for converting HTTP request bodies into POJOs
for this method.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOpAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOpAnnotation.java
index 5cf775c722..8c1ce61e96 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOpAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOpAnnotation.java
@@ -64,7 +64,7 @@ public class RestOpAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private Class<? extends RestConverter>[] converters = new
Class[0];
@@ -448,24 +448,6 @@ public class RestOpAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
/**
@@ -528,7 +510,7 @@ public class RestOpAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestOp {
+ private static class Object extends AnnotationObject implements RestOp {
private final String[] description;
private final Class<? extends RestConverter>[] converters;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
index a4fa37a519..36de960dae 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
@@ -432,17 +432,6 @@ public @interface RestOptions {
*/
Class<? extends RestMatcher>[] matchers() default {};
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
/**
* Optional path pattern for the specified method.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptionsAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptionsAnnotation.java
index 794d2db7d8..666ba98131 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptionsAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptionsAnnotation.java
@@ -61,7 +61,7 @@ public class RestOptionsAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private Class<? extends RestConverter>[] converters = new
Class[0];
@@ -373,24 +373,6 @@ public class RestOptionsAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
/**
@@ -438,7 +420,7 @@ public class RestOptionsAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestOptions {
+ private static class Object extends AnnotationObject implements
RestOptions {
private final String[] description;
private final Class<? extends RestConverter>[] converters;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
index c82a6ca462..5894501ad8 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
@@ -524,17 +524,6 @@ public @interface RestPatch {
*/
String maxInput() default "";
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
/**
* Specifies the parsers for converting HTTP request bodies into POJOs
for this method.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatchAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatchAnnotation.java
index 6a0f32d5bd..0ed59685c1 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatchAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatchAnnotation.java
@@ -61,7 +61,7 @@ public class RestPatchAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private Class<? extends RestConverter>[] converters = new
Class[0];
private Class<? extends RestGuard>[] guards = new Class[0];
@@ -433,24 +433,6 @@ public class RestPatchAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
/**
@@ -503,7 +485,7 @@ public class RestPatchAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestPatch {
+ private static class Object extends AnnotationObject implements
RestPatch {
private final String[] description;
private final Class<? extends RestConverter>[] converters;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
index e4626c2843..f1648eb7d2 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
@@ -524,17 +524,6 @@ public @interface RestPost {
*/
String maxInput() default "";
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
/**
* Specifies the parsers for converting HTTP request bodies into POJOs
for this method.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostAnnotation.java
index 8ca3d47187..a17ae2fc31 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostAnnotation.java
@@ -61,7 +61,7 @@ public class RestPostAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private Class<? extends RestConverter>[] converters = new
Class[0];
@@ -433,24 +433,6 @@ public class RestPostAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
/**
@@ -503,7 +485,7 @@ public class RestPostAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestPost {
+ private static class Object extends AnnotationObject implements
RestPost {
private final String[] description;
private final Class<? extends RestConverter>[] converters;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCall.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCall.java
index 2a85cb960b..0fdf072952 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCall.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCall.java
@@ -162,15 +162,4 @@ public @interface RestPostCall {
* @since 9.2.0
*/
String[] description() default {};
-
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation.java
index cb9db86ce4..186bc74e6a 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation.java
@@ -64,7 +64,7 @@ public class RestPostCallAnnotation {
* <li class='jm'>{@link
org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
@@ -95,30 +95,12 @@ public class RestPostCallAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder
on(org.apache.juneau.commons.reflect.MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestPostCall {
+ private static class Object extends AnnotationObject implements
RestPostCall {
private final String[] description;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInit.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInit.java
index f481e2298f..236b401892 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInit.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInit.java
@@ -82,15 +82,4 @@ public @interface RestPostInit {
* @since 9.2.0
*/
String[] description() default {};
-
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation.java
index cf2e9d1b66..f250007c49 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation.java
@@ -64,7 +64,7 @@ public class RestPostInitAnnotation {
* <li class='jm'>{@link
org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private boolean childFirst;
@@ -106,30 +106,12 @@ public class RestPostInitAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder
on(org.apache.juneau.commons.reflect.MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestPostInit {
+ private static class Object extends AnnotationObject implements
RestPostInit {
private final String[] description;
private final boolean childFirst;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCall.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCall.java
index 3ccd457e4d..313f24d6f2 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCall.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCall.java
@@ -169,15 +169,4 @@ public @interface RestPreCall {
* @since 9.2.0
*/
String[] description() default {};
-
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation.java
index f68dc48f2c..5bba98061e 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation.java
@@ -64,7 +64,7 @@ public class RestPreCallAnnotation {
* <li class='jm'>{@link
org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
@@ -95,30 +95,12 @@ public class RestPreCallAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder
on(org.apache.juneau.commons.reflect.MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestPreCall {
+ private static class Object extends AnnotationObject implements
RestPreCall {
private final String[] description;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
index 72e0323854..bb134d6eea 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
@@ -524,17 +524,6 @@ public @interface RestPut {
*/
String maxInput() default "";
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
/**
* Specifies the parsers for converting HTTP request bodies into POJOs
for this method.
*
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPutAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPutAnnotation.java
index 8ba96c8815..41f05ecacc 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPutAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPutAnnotation.java
@@ -61,7 +61,7 @@ public class RestPutAnnotation {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Builder
inheritance
})
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
private Class<? extends RestConverter>[] converters = new
Class[0];
@@ -433,24 +433,6 @@ public class RestPutAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
/**
@@ -503,7 +485,7 @@ public class RestPutAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestPut {
+ private static class Object extends AnnotationObject implements RestPut
{
private final String[] description;
private final Class<? extends RestConverter>[] converters;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCall.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCall.java
index 7d88f48964..8f4db2f1c2 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCall.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCall.java
@@ -93,15 +93,4 @@ public @interface RestStartCall {
* @since 9.2.0
*/
String[] description() default {};
-
- /**
- * Dynamically apply this annotation to the specified methods.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically
Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation.java
index a066b6b3e9..c68f4aa802 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation.java
@@ -64,7 +64,7 @@ public class RestStartCallAnnotation {
* <li class='jm'>{@link
org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderM {
+ public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
@@ -95,30 +95,12 @@ public class RestStartCallAnnotation {
return this;
}
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(java.lang.reflect.Method...value) {
- super.on(value);
- return this;
- }
-
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder
on(org.apache.juneau.commons.reflect.MethodInfo...value) {
- super.on(value);
- return this;
- }
-
}
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject
compares all annotation interface methods; subclass fields are accessed via
those methods
})
- private static class Object extends AppliedAnnotationObject implements
RestStartCall {
+ private static class Object extends AnnotationObject implements
RestStartCall {
private final String[] description;
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
index e4eefba02a..667b681aea 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
@@ -42,8 +42,6 @@ import org.junit.jupiter.api.*;
})
class RestAnnotation_Test extends TestBase {
- private static final String CNAME = RestAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
@@ -77,8 +75,6 @@ class RestAnnotation_Test extends TestBase {
.guards(RestGuard.class)
.maxInput("q")
.messages("r")
- .on("s")
- .onClass(RestAnnotation_Test.class)
.parsers(Parser.class)
.partParser(HttpPartParser.class)
.partSerializer(HttpPartSerializer.class)
@@ -131,8 +127,6 @@ class RestAnnotation_Test extends TestBase {
.guards(RestGuard.class)
.maxInput("q")
.messages("r")
- .on("s")
- .onClass(RestAnnotation_Test.class)
.parsers(Parser.class)
.partParser(HttpPartParser.class)
.partSerializer(HttpPartSerializer.class)
@@ -158,8 +152,8 @@ class RestAnnotation_Test extends TestBase {
@Test void a01_basic() {
assertBean(a1,
-
"allowedHeaderParams,allowedMethodHeaders,allowedMethodParams,allowedParserOptions,allowedSerializerOptions,beanStore,callLogger,children,clientVersionHeader,config,consumes,converters,debug,debugEnablement,debugOn,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestHeaders,defaultResponseHeaders,description,disableContentParam,encoders,guards,maxInput,messages,noInherit,on,onClass,parsers,partParser,partSerializer,path,produces,renderResponseStackTr
[...]
-
"b,c,d,[e1],[e2],BasicBeanStore,CallLogger,[RestAnnotation_Test],e,f,[g],[RestConverter],h,DebugEnablement,i,j,k,l,[m],[n],[o],[p],a,[Encoder],[RestGuard],q,r,[e3],[s],[RestAnnotation_Test],[Parser],HttpPartParser,HttpPartSerializer,t,[u],v,[ResponseProcessor],RestChildren,[RestOpArg],w,x,[Serializer],y,StaticFiles,{{[],,,},[],{[],},{[],,},[],[],[],[],},BasicSwaggerProvider,[z],aa,bb,cc,dd");
+
"allowedHeaderParams,allowedMethodHeaders,allowedMethodParams,allowedParserOptions,allowedSerializerOptions,beanStore,callLogger,children,clientVersionHeader,config,consumes,converters,debug,debugEnablement,debugOn,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestHeaders,defaultResponseHeaders,description,disableContentParam,encoders,guards,maxInput,messages,noInherit,parsers,partParser,partSerializer,path,produces,renderResponseStackTraces,respon
[...]
+
"b,c,d,[e1],[e2],BasicBeanStore,CallLogger,[RestAnnotation_Test],e,f,[g],[RestConverter],h,DebugEnablement,i,j,k,l,[m],[n],[o],[p],a,[Encoder],[RestGuard],q,r,[e3],[Parser],HttpPartParser,HttpPartSerializer,t,[u],v,[ResponseProcessor],RestChildren,[RestOpArg],w,x,[Serializer],y,StaticFiles,{{[],,,},[],{[],},{[],,},[],[],[],[],},BasicSwaggerProvider,[z],aa,bb,cc,dd");
}
@Test void a02_testEquivalency() {
@@ -178,27 +172,6 @@ class RestAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() {
- var c1 = RestAnnotation.create(C1.class).on(C2.class).build();
- var c2 = RestAnnotation.create("a").on("b").build();
-
- assertBean(c1, "on", "["+CNAME+"$C1,"+CNAME+"$C2]");
- assertBean(c2, "on", "[a,b]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@@ -232,8 +205,6 @@ class RestAnnotation_Test extends TestBase {
guards=RestGuard.class,
maxInput="q",
messages="r",
- on="s",
- onClass=RestAnnotation_Test.class,
parsers=Parser.class,
partParser=HttpPartParser.class,
partSerializer=HttpPartSerializer.class,
@@ -288,8 +259,6 @@ class RestAnnotation_Test extends TestBase {
guards=RestGuard.class,
maxInput="q",
messages="r",
- on="s",
- onClass=RestAnnotation_Test.class,
parsers=Parser.class,
partParser=HttpPartParser.class,
partSerializer=HttpPartSerializer.class,
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation_Test.java
index 41b07ac84d..f5a0b16a9e 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDeleteAnnotation_Test.java
@@ -31,8 +31,6 @@ import org.junit.jupiter.api.*;
})
class RestDeleteAnnotation_Test extends TestBase {
- private static final String CNAME =
RestDeleteAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
@@ -53,7 +51,6 @@ class RestDeleteAnnotation_Test extends TestBase {
.encoders(Encoder.class)
.guards(RestGuard.class)
.matchers(RestMatcher.class)
- .on("j")
.path("k")
.roleGuard("l")
.rolesDeclared("m")
@@ -78,7 +75,6 @@ class RestDeleteAnnotation_Test extends TestBase {
.encoders(Encoder.class)
.guards(RestGuard.class)
.matchers(RestMatcher.class)
- .on("j")
.path("k")
.roleGuard("l")
.rolesDeclared("m")
@@ -89,8 +85,8 @@ class RestDeleteAnnotation_Test extends TestBase {
@Test void a01_basic() {
assertBean(a1,
-
"allowedParserOptions,allowedSerializerOptions,clientVersion,debug,defaultAccept,defaultCharset,defaultRequestAttributes,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,noInherit,on,path,roleGuard,rolesDeclared,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,schemes,summary,tags,value},value",
-
"[p1],[p2],a,b,c,d,[f],[g],[e],[h],[i],[Encoder],[RestGuard],[RestMatcher],[p3],[j],[k],l,m,n,{[],,[],{[],},,[],[],[],[],[],[],[]},o");
+
"allowedParserOptions,allowedSerializerOptions,clientVersion,debug,defaultAccept,defaultCharset,defaultRequestAttributes,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,noInherit,path,roleGuard,rolesDeclared,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,schemes,summary,tags,value},value",
+
"[p1],[p2],a,b,c,d,[f],[g],[e],[h],[i],[Encoder],[RestGuard],[RestMatcher],[p3],[k],l,m,n,{[],,[],{[],},,[],[],[],[],[],[],[]},o");
}
@Test void a02_testEquivalency() {
@@ -109,25 +105,6 @@ class RestDeleteAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestDeleteAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@@ -150,7 +127,6 @@ class RestDeleteAnnotation_Test extends TestBase {
encoders=Encoder.class,
guards=RestGuard.class,
matchers=RestMatcher.class,
- on="j",
path="k",
roleGuard="l",
rolesDeclared="m",
@@ -176,7 +152,6 @@ class RestDeleteAnnotation_Test extends TestBase {
encoders=Encoder.class,
guards=RestGuard.class,
matchers=RestMatcher.class,
- on="j",
path="k",
roleGuard="l",
rolesDeclared="m",
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation_Test.java
index 512c342678..906d2c634a 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestDestroyAnnotation_Test.java
@@ -28,24 +28,20 @@ import org.junit.jupiter.api.*;
})
class RestDestroyAnnotation_Test extends TestBase {
- private static final String CNAME =
RestDestroyAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
RestDestroy a1 = RestDestroyAnnotation.create()
.description("a")
- .on("b")
.build();
RestDestroy a2 = RestDestroyAnnotation.create()
.description("a")
- .on("b")
.build();
@Test void a01_basic() {
- assertBean(a1, "description,on", "[a],[b]");
+ assertBean(a1, "description", "[a]");
}
@Test void a02_testEquivalency() {
@@ -64,39 +60,18 @@ class RestDestroyAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestDestroyAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@RestDestroy(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D1 {}
RestDestroy d1 = D1.class.getAnnotationsByType(RestDestroy.class)[0];
@RestDestroy(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D2 {}
RestDestroy d2 = D2.class.getAnnotationsByType(RestDestroy.class)[0];
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation_Test.java
index f627432a1d..a5c4ecc496 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestEndCallAnnotation_Test.java
@@ -28,24 +28,20 @@ import org.junit.jupiter.api.*;
})
class RestEndCallAnnotation_Test extends TestBase {
- private static final String CNAME =
RestEndCallAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
RestEndCall a1 = RestEndCallAnnotation.create()
.description("a")
- .on("b")
.build();
RestEndCall a2 = RestEndCallAnnotation.create()
.description("a")
- .on("b")
.build();
@Test void a01_basic() {
- assertBean(a1, "description,on", "[a],[b]");
+ assertBean(a1, "description", "[a]");
}
@Test void a02_testEquivalency() {
@@ -64,39 +60,18 @@ class RestEndCallAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestEndCallAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@RestEndCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D1 {}
RestEndCall d1 = D1.class.getAnnotationsByType(RestEndCall.class)[0];
@RestEndCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D2 {}
RestEndCall d2 = D2.class.getAnnotationsByType(RestEndCall.class)[0];
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestGetAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestGetAnnotation_Test.java
index 98fc623d72..b1ef5d8bf7 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestGetAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestGetAnnotation_Test.java
@@ -33,8 +33,6 @@ import org.junit.jupiter.api.*;
})
class RestGetAnnotation_Test extends TestBase {
- private static final String CNAME =
RestGetAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
@@ -56,7 +54,6 @@ class RestGetAnnotation_Test extends TestBase {
.encoders(Encoder.class)
.guards(RestGuard.class)
.matchers(RestMatcher.class)
- .on("j")
.path("k")
.produces("l")
.roleGuard("m")
@@ -84,7 +81,6 @@ class RestGetAnnotation_Test extends TestBase {
.encoders(Encoder.class)
.guards(RestGuard.class)
.matchers(RestMatcher.class)
- .on("j")
.path("k")
.produces("l")
.roleGuard("m")
@@ -97,8 +93,8 @@ class RestGetAnnotation_Test extends TestBase {
@Test void a01_basic() {
assertBean(a1,
-
"allowedParserOptions,allowedSerializerOptions,clientVersion,converters,debug,defaultAccept,defaultCharset,defaultRequestAttributes,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,noInherit,on,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,schemes,summary,tags,value},value",
-
"[q1],[q2],a,[RestConverter],b,c,d,[f],[g],[e],[h],[i],[Encoder],[RestGuard],[RestMatcher],[q3],[j],[k],[l],m,n,[Serializer],o,{[],,[],{[],},,[],[],[],[],[],[],[]},p");
+
"allowedParserOptions,allowedSerializerOptions,clientVersion,converters,debug,defaultAccept,defaultCharset,defaultRequestAttributes,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,noInherit,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,schemes,summary,tags,value},value",
+
"[q1],[q2],a,[RestConverter],b,c,d,[f],[g],[e],[h],[i],[Encoder],[RestGuard],[RestMatcher],[q3],[k],[l],m,n,[Serializer],o,{[],,[],{[],},,[],[],[],[],[],[],[]},p");
}
@Test void a02_testEquivalency() {
@@ -117,25 +113,6 @@ class RestGetAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestGetAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@@ -159,7 +136,6 @@ class RestGetAnnotation_Test extends TestBase {
encoders=Encoder.class,
guards=RestGuard.class,
matchers=RestMatcher.class,
- on="j",
path="k",
produces="l",
roleGuard="m",
@@ -188,7 +164,6 @@ class RestGetAnnotation_Test extends TestBase {
encoders=Encoder.class,
guards=RestGuard.class,
matchers=RestMatcher.class,
- on="j",
path="k",
produces="l",
roleGuard="m",
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInitAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInitAnnotation_Test.java
index 0c78a97826..663db34791 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInitAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInitAnnotation_Test.java
@@ -31,24 +31,20 @@ import org.junit.jupiter.api.*;
})
class RestInitAnnotation_Test extends TestBase {
- private static final String CNAME =
RestInitAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
RestInit a1 = RestInitAnnotation.create()
.description("a")
- .on("b")
.build();
RestInit a2 = RestInitAnnotation.create()
.description("a")
- .on("b")
.build();
@Test void a01_basic() {
- assertBean(a1, "description,on", "[a],[b]");
+ assertBean(a1, "description", "[a]");
}
@Test void a02_testEquivalency() {
@@ -67,39 +63,18 @@ class RestInitAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestInitAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@RestInit(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D1 {}
RestInit d1 = D1.class.getAnnotationsByType(RestInit.class)[0];
@RestInit(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D2 {}
RestInit d2 = D2.class.getAnnotationsByType(RestInit.class)[0];
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOpAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOpAnnotation_Test.java
index 2fec081b9b..f6ab47fcc0 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOpAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOpAnnotation_Test.java
@@ -34,8 +34,6 @@ import org.junit.jupiter.api.*;
})
class RestOpAnnotation_Test extends TestBase {
- private static final String CNAME =
RestOpAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
@@ -62,7 +60,6 @@ class RestOpAnnotation_Test extends TestBase {
.matchers(RestMatcher.class)
.maxInput("m")
.method("n")
- .on("o")
.parsers(Parser.class)
.path("p")
.produces("q")
@@ -96,7 +93,6 @@ class RestOpAnnotation_Test extends TestBase {
.matchers(RestMatcher.class)
.maxInput("m")
.method("n")
- .on("o")
.parsers(Parser.class)
.path("p")
.produces("q")
@@ -110,8 +106,8 @@ class RestOpAnnotation_Test extends TestBase {
@Test void a01_basic() {
assertBean(a1,
-
"allowedParserOptions,allowedSerializerOptions,clientVersion,consumes,converters,debug,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestFormData,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,maxInput,method,noInherit,on,parsers,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,res
[...]
-
"[v1],[v2],a,[b],[RestConverter],c,d,e,f,[i],[g],[j],[h],[k],[l],[Encoder],[RestGuard],[RestMatcher],m,n,[v3],[o],[Parser],[p],[q],r,s,[Serializer],t,{[],,[],{[],},,[],[],[],[],[],[],[]},u");
+
"allowedParserOptions,allowedSerializerOptions,clientVersion,consumes,converters,debug,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestFormData,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,maxInput,method,noInherit,parsers,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,respon
[...]
+
"[v1],[v2],a,[b],[RestConverter],c,d,e,f,[i],[g],[j],[h],[k],[l],[Encoder],[RestGuard],[RestMatcher],m,n,[v3],[Parser],[p],[q],r,s,[Serializer],t,{[],,[],{[],},,[],[],[],[],[],[],[]},u");
}
@Test void a02_testEquivalency() {
@@ -130,25 +126,6 @@ class RestOpAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestOpAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@@ -177,7 +154,6 @@ class RestOpAnnotation_Test extends TestBase {
matchers=RestMatcher.class,
maxInput="m",
method="n",
- on="o",
parsers=Parser.class,
path="p",
produces="q",
@@ -212,7 +188,6 @@ class RestOpAnnotation_Test extends TestBase {
matchers=RestMatcher.class,
maxInput="m",
method="n",
- on="o",
parsers=Parser.class,
path="p",
produces="q",
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostAnnotation_Test.java
index 54b27b2e05..27ce3be50f 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostAnnotation_Test.java
@@ -34,8 +34,6 @@ import org.junit.jupiter.api.*;
})
class RestPostAnnotation_Test extends TestBase {
- private static final String CNAME =
RestPostAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
@@ -61,7 +59,6 @@ class RestPostAnnotation_Test extends TestBase {
.guards(RestGuard.class)
.matchers(RestMatcher.class)
.maxInput("m")
- .on("n")
.parsers(Parser.class)
.path("o")
.produces("p")
@@ -94,7 +91,6 @@ class RestPostAnnotation_Test extends TestBase {
.guards(RestGuard.class)
.matchers(RestMatcher.class)
.maxInput("m")
- .on("n")
.parsers(Parser.class)
.path("o")
.produces("p")
@@ -108,8 +104,8 @@ class RestPostAnnotation_Test extends TestBase {
@Test void a01_basic() {
assertBean(a1,
-
"allowedParserOptions,allowedSerializerOptions,clientVersion,consumes,converters,debug,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestFormData,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,maxInput,noInherit,on,parsers,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,
[...]
-
"[u1],[u2],a,[b],[RestConverter],c,d,e,f,[i],[g],[j],[h],[k],[l],[Encoder],[RestGuard],[RestMatcher],m,[u3],[n],[Parser],[o],[p],q,r,[Serializer],s,{[],,[],{[],},,[],[],[],[],[],[],[]},t");
+
"allowedParserOptions,allowedSerializerOptions,clientVersion,consumes,converters,debug,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestFormData,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,maxInput,noInherit,parsers,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,sch
[...]
+
"[u1],[u2],a,[b],[RestConverter],c,d,e,f,[i],[g],[j],[h],[k],[l],[Encoder],[RestGuard],[RestMatcher],m,[u3],[Parser],[o],[p],q,r,[Serializer],s,{[],,[],{[],},,[],[],[],[],[],[],[]},t");
}
@Test void a02_testEquivalency() {
@@ -128,25 +124,6 @@ class RestPostAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestPostAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@@ -174,7 +151,6 @@ class RestPostAnnotation_Test extends TestBase {
guards=RestGuard.class,
matchers=RestMatcher.class,
maxInput="m",
- on="n",
parsers=Parser.class,
path="o",
produces="p",
@@ -208,7 +184,6 @@ class RestPostAnnotation_Test extends TestBase {
guards=RestGuard.class,
matchers=RestMatcher.class,
maxInput="m",
- on="n",
parsers=Parser.class,
path="o",
produces="p",
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation_Test.java
index b930851bd3..1d2892f177 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostCallAnnotation_Test.java
@@ -28,24 +28,20 @@ import org.junit.jupiter.api.*;
})
class RestPostCallAnnotation_Test extends TestBase {
- private static final String CNAME =
RestPostCallAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
RestPostCall a1 = RestPostCallAnnotation.create()
.description("a")
- .on("b")
.build();
RestPostCall a2 = RestPostCallAnnotation.create()
.description("a")
- .on("b")
.build();
@Test void a01_basic() {
- assertBean(a1, "description,on", "[a],[b]");
+ assertBean(a1, "description", "[a]");
}
@Test void a02_testEquivalency() {
@@ -64,39 +60,18 @@ class RestPostCallAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestPostCallAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@RestPostCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D1 {}
RestPostCall d1 = D1.class.getAnnotationsByType(RestPostCall.class)[0];
@RestPostCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D2 {}
RestPostCall d2 = D2.class.getAnnotationsByType(RestPostCall.class)[0];
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation_Test.java
index ff475e63cb..5384736d89 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPostInitAnnotation_Test.java
@@ -28,26 +28,22 @@ import org.junit.jupiter.api.*;
})
class RestPostInitAnnotation_Test extends TestBase {
- private static final String CNAME =
RestPostInitAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
RestPostInit a1 = RestPostInitAnnotation.create()
.description("a")
- .on("b")
.childFirst()
.build();
RestPostInit a2 = RestPostInitAnnotation.create()
.description("a")
- .on("b")
.childFirst()
.build();
@Test void a01_basic() {
- assertBean(a1, "childFirst,description,on", "true,[a],[b]");
+ assertBean(a1, "childFirst,description", "true,[a]");
}
@Test void a02_testEquivalency() {
@@ -66,41 +62,20 @@ class RestPostInitAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestPostInitAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@RestPostInit(
childFirst=true,
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D1 {}
RestPostInit d1 = D1.class.getAnnotationsByType(RestPostInit.class)[0];
@RestPostInit(
childFirst=true,
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D2 {}
RestPostInit d2 = D2.class.getAnnotationsByType(RestPostInit.class)[0];
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation_Test.java
index 70bed90d6a..4967ac87ef 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPreCallAnnotation_Test.java
@@ -28,24 +28,20 @@ import org.junit.jupiter.api.*;
})
class RestPreCallAnnotation_Test extends TestBase {
- private static final String CNAME =
RestPreCallAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
RestPreCall a1 = RestPreCallAnnotation.create()
.description("a")
- .on("b")
.build();
RestPreCall a2 = RestPreCallAnnotation.create()
.description("a")
- .on("b")
.build();
@Test void a01_basic() {
- assertBean(a1, "description,on", "[a],[b]");
+ assertBean(a1, "description", "[a]");
}
@Test void a02_testEquivalency() {
@@ -64,39 +60,18 @@ class RestPreCallAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestPreCallAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@RestPreCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D1 {}
RestPreCall d1 = D1.class.getAnnotationsByType(RestPreCall.class)[0];
@RestPreCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D2 {}
RestPreCall d2 = D2.class.getAnnotationsByType(RestPreCall.class)[0];
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPutAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPutAnnotation_Test.java
index b6f1a433b2..a5ec017ffd 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPutAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestPutAnnotation_Test.java
@@ -34,8 +34,6 @@ import org.junit.jupiter.api.*;
})
class RestPutAnnotation_Test extends TestBase {
- private static final String CNAME =
RestPutAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
@@ -61,7 +59,6 @@ class RestPutAnnotation_Test extends TestBase {
.guards(RestGuard.class)
.matchers(RestMatcher.class)
.maxInput("m")
- .on("n")
.parsers(Parser.class)
.path("o")
.produces("p")
@@ -94,7 +91,6 @@ class RestPutAnnotation_Test extends TestBase {
.guards(RestGuard.class)
.matchers(RestMatcher.class)
.maxInput("m")
- .on("n")
.parsers(Parser.class)
.path("o")
.produces("p")
@@ -108,8 +104,8 @@ class RestPutAnnotation_Test extends TestBase {
@Test void a01_basic() {
assertBean(a1,
-
"allowedParserOptions,allowedSerializerOptions,clientVersion,consumes,converters,debug,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestFormData,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,maxInput,noInherit,on,parsers,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,
[...]
-
"[u1],[u2],a,[b],[RestConverter],c,d,e,f,[i],[g],[j],[h],[k],[l],[Encoder],[RestGuard],[RestMatcher],m,[u3],[n],[Parser],[o],[p],q,r,[Serializer],s,{[],,[],{[],},,[],[],[],[],[],[],[]},t");
+
"allowedParserOptions,allowedSerializerOptions,clientVersion,consumes,converters,debug,defaultAccept,defaultCharset,defaultContentType,defaultRequestAttributes,defaultRequestFormData,defaultRequestHeaders,defaultRequestQueryData,defaultResponseHeaders,description,encoders,guards,matchers,maxInput,noInherit,parsers,path,produces,roleGuard,rolesDeclared,serializers,summary,swagger{consumes,deprecated,description,externalDocs{description,url},operationId,parameters,produces,responses,sch
[...]
+
"[u1],[u2],a,[b],[RestConverter],c,d,e,f,[i],[g],[j],[h],[k],[l],[Encoder],[RestGuard],[RestMatcher],m,[u3],[Parser],[o],[p],q,r,[Serializer],s,{[],,[],{[],},,[],[],[],[],[],[],[]},t");
}
@Test void a02_testEquivalency() {
@@ -128,25 +124,6 @@ class RestPutAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestPutAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@@ -174,7 +151,6 @@ class RestPutAnnotation_Test extends TestBase {
guards=RestGuard.class,
matchers=RestMatcher.class,
maxInput="m",
- on="n",
parsers=Parser.class,
path="o",
produces="p",
@@ -208,7 +184,6 @@ class RestPutAnnotation_Test extends TestBase {
guards=RestGuard.class,
matchers=RestMatcher.class,
maxInput="m",
- on="n",
parsers=Parser.class,
path="o",
produces="p",
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation_Test.java
index 8183224bfd..5ba1d950d1 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestStartCallAnnotation_Test.java
@@ -28,24 +28,20 @@ import org.junit.jupiter.api.*;
})
class RestStartCallAnnotation_Test extends TestBase {
- private static final String CNAME =
RestStartCallAnnotation_Test.class.getName();
-
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
RestStartCall a1 = RestStartCallAnnotation.create()
.description("a")
- .on("b")
.build();
RestStartCall a2 = RestStartCallAnnotation.create()
.description("a")
- .on("b")
.build();
@Test void a01_basic() {
- assertBean(a1, "description,on", "[a],[b]");
+ assertBean(a1, "description", "[a]");
}
@Test void a02_testEquivalency() {
@@ -64,39 +60,18 @@ class RestStartCallAnnotation_Test extends TestBase {
assertSame(bc1, bc2);
}
-
//------------------------------------------------------------------------------------------------------------------
- // Other methods.
-
//------------------------------------------------------------------------------------------------------------------
-
- public static class C1 {
- public int f1;
- public void m1() {}
- }
- public static class C2 {
- public int f2;
- public void m2() {}
- }
-
- @Test void c01_otherMethods() throws Exception {
- var c4 =
RestStartCallAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertBean(c4, "on", "["+CNAME+"$C1.m1(),"+CNAME+"$C2.m2()]");
- }
-
//------------------------------------------------------------------------------------------------------------------
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
@RestStartCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D1 {}
RestStartCall d1 =
D1.class.getAnnotationsByType(RestStartCall.class)[0];
@RestStartCall(
- description={ "a" },
- on="b"
+ description={ "a" }
)
public static class D2 {}
RestStartCall d2 =
D2.class.getAnnotationsByType(RestStartCall.class)[0];
diff --git a/todo/move-http-annotation-to-rest-common.md
b/todo/move-http-annotation-to-rest-common.md
index e58aaeabdf..755b1446c5 100644
--- a/todo/move-http-annotation-to-rest-common.md
+++ b/todo/move-http-annotation-to-rest-common.md
@@ -10,6 +10,22 @@ Today the NG client has its own simplified copies
(`ng.http.remote.Body`, `Heade
Consolidating on the originals eliminates duplication and lets users annotate
proxy interfaces once for
both clients.
+## Prerequisites (completed)
+
+### XApply annotation split (done)
+
+All marshall annotations (`@Schema`, `@Bean`, `@Json`, `@Xml`, etc.) have been
split so that:
+- The core `@X` annotation is a **pure data annotation** with no
`on()`/`onClass()`/`@ContextApply`
+- A separate `@XApply` annotation (in marshall) carries targeting and
`@ContextApply`
+- `AnnotationProvider.Builder.addRuntimeAnnotations()` handles unwrapping
`@XApply` generically
+
+This means annotations like `@Schema` can now move to `juneau-commons` without
pulling in marshall.
+
+### REST annotation targeting removal (done)
+
+All REST annotations (`@Rest`, `@RestOp`, `@RestGet`, etc.) had their unused
`on()`/`onClass()` removed.
+The `@ContextApply` appliers remain (they apply real REST config), but there
is no dynamic targeting.
+
## Current Location
`juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/`
@@ -58,6 +74,9 @@ The 14 builder classes import from:
These cannot move to `juneau-rest-common` without also moving their
dependencies.
+**Note:** Now that `@Schema` is a pure data annotation (no `@ContextApply`),
it could potentially
+move to `juneau-commons` first, which would reduce the coupling of these
builder classes.
+
### 3. Wide usage across modules
~279 files import from this package across all modules. Most use wildcard
imports, so
@@ -65,11 +84,11 @@ a package-name change is a single-line edit per file — but
the volume is high.
## Plan
-### Phase 1 — Decouple annotations from juneau-marshall internals
+### Phase 1 — Audit annotation dependencies
The `*Annotation` builder classes and the `httppart/bean` classes are the main
coupling points.
-The builder classes exist primarily to support Juneau's dynamic annotation
infrastructure
-(`AnnotationWorkList`, `@ContextApply`, etc.). The NG client does not use any
of that machinery.
+The builder classes exist primarily to support Juneau's dynamic annotation
infrastructure.
+The NG client does not use any of that machinery.
**Tasks:**
@@ -79,6 +98,8 @@ The builder classes exist primarily to support Juneau's
dynamic annotation infra
- [ ] Determine whether `HttpPartSchema`, `RequestBeanMeta`, and
`ResponseBeanMeta` should move
to `juneau-rest-common` alongside the annotations, or whether those
should stay in
`juneau-marshall` and reference the annotations via a shared dependency.
+- [ ] Assess whether the http.annotation `*Annotation` builder classes still
need `on()`/`onClass()`
+ or whether they also need the XApply split (check if any of these
annotations have targeting).
### Phase 2 — Move the bare annotations
@@ -90,11 +111,10 @@ Move the 14 `@interface` files + 3 constant classes +
`package-info.java` into
- [ ] Move annotation source files to `juneau-rest-common`
- [ ] Leave `*Annotation` builder classes in `juneau-marshall` (they depend on
marshall internals
and are only consumed by the classic annotation-processing pipeline)
-- [ ] Verify `juneau-marshall` can still compile — it already depends on
nothing in `juneau-rest`,
- so the annotations must be available via a dependency. Options:
- - Add `juneau-rest-common` as a dependency of `juneau-marshall`
(**creates a cycle — not viable**)
+- [ ] Verify `juneau-marshall` can still compile. Options:
- Move `HttpPartSchema` + `RequestBeanMeta` + `ResponseBeanMeta` to
`juneau-rest-common` too
- Keep the annotations in `juneau-marshall` as thin re-exports / keep a
copy
+ - Add `juneau-rest-common` as a dependency of `juneau-marshall`
(**creates a cycle — not viable**)
- [ ] Update all import statements across the codebase (mostly mechanical —
wildcard imports)
### Phase 3 — Move `httppart` types if needed
diff --git a/todo/xapply-annotation-split.md b/todo/xapply-annotation-split.md
deleted file mode 100644
index 1e4e4290e8..0000000000
--- a/todo/xapply-annotation-split.md
+++ /dev/null
@@ -1,230 +0,0 @@
-# Split `on`/`onClass` into separate `@XApply` annotations
-
-## Goal
-
-Remove `on()` and `onClass()` from all context-appliable annotations and move
them into companion `@XApply` annotations. This separates annotation
**content** (what to configure) from **targeting** (where to apply it),
enabling annotations like `@Schema` to live in `juneau-commons` while dynamic
application machinery stays in `juneau-marshall`.
-
-## Background
-
-Today, annotations like `@Schema`, `@Bean`, `@Json`, etc. serve two roles:
-
-1. **Inline declaration** — placed directly on a class/method/field, no
`on`/`onClass` set.
-2. **Dynamic application** — placed on a config class with `on`/`onClass` set,
applied later via `BeanContext.Builder.applyAnnotations()`.
-
-The `@ContextApply` meta-annotation and `AnnotationApplier` machinery in
marshall handles role 2. The applier checks `on`/`onClass`; if populated, it
stores the annotation for later target matching.
-
-**Problem:** `on`/`onClass` and `@ContextApply` are **marshall-only**
concepts, but they live on annotations that should be usable in
`juneau-commons` or `juneau-rest-common` without pulling in marshall.
-
-## Design
-
-### Before (current)
-
-```java
-@Schema(on = "com.example.Foo", format = "date-time")
-@Bean(onClass = Foo.class, sort = true)
-public class MyConfig {}
-```
-
-### After (proposed)
-
-```java
-@SchemaApply(on = "com.example.Foo", value = @Schema(format = "date-time"))
-@BeanApply(onClass = Foo.class, value = @Bean(sort = true))
-public class MyConfig {}
-```
-
-- `@Schema` has **no** `on`, `onClass`, or `@ContextApply` — it is a pure data
annotation.
-- `@SchemaApply` lives in marshall, carries `on`/`onClass` and
`@ContextApply`, and wraps the annotation via a `value()` member.
-- Breaking change: existing `@Schema(on = ...)` usages must be rewritten.
-
----
-
-## Annotations in scope
-
-### Group A: `org.apache.juneau.annotation` — both `on()` and `onClass()`
-
-These have the `AppliedOnClassAnnotationObject` builder base and target types
(classes).
-
-| Annotation | Builder base | Applier target | Companion file |
-|---|---|---|---|
-| `@Schema` | `BuilderTMF` | `Context.Builder` | `SchemaAnnotation.java` |
-| `@Swap` | `BuilderTMF` | `BeanContext.Builder` | `SwapAnnotation.java` |
-| `@Bean` | `BuilderT` | `BeanContext.Builder` | `BeanAnnotation.java` |
-| `@BeanIgnore` | `BuilderTMFC` | `BeanContext.Builder` |
`BeanIgnoreAnnotation.java` |
-| `@Uri` | `BuilderTMF` | `BeanContext.Builder` | `UriAnnotation.java` |
-| `@Marshalled` | `BuilderT` | `BeanContext.Builder` |
`MarshalledAnnotation.java` |
-| `@Example` | `BuilderTMF` | `BeanContext.Builder` | `ExampleAnnotation.java`
|
-
-### Group B: `org.apache.juneau.annotation` — `on()` only (no `onClass()`)
-
-These have the `AppliedAnnotationObject` builder base and target
methods/fields/constructors only.
-
-| Annotation | Builder base | Companion file |
-|---|---|---|
-| `@Beanp` | `BuilderMF` | `BeanpAnnotation.java` |
-| `@Beanc` | `BuilderC` | `BeancAnnotation.java` |
-| `@ParentProperty` | `BuilderMF` | `ParentPropertyAnnotation.java` |
-| `@NameProperty` | `BuilderMF` | `NamePropertyAnnotation.java` |
-
-### Group C: Format-specific annotations (marshall subpackages) — both `on()`
and `onClass()`
-
-| Annotation | Package |
-|---|---|
-| `@Json` | `json/annotation` |
-| `@Xml` | `xml/annotation` |
-| `@Html` | `html/annotation` |
-| `@HtmlLink` | `html/annotation` |
-| `@Csv` | `csv/annotation` |
-| `@Uon` | `uon/annotation` |
-| `@UrlEncoding` | `urlencoding/annotation` |
-| `@MsgPack` | `msgpack/annotation` |
-| `@OpenApi` | `oapi/annotation` |
-| `@PlainText` | `plaintext/annotation` |
-| `@SoapXml` | `soap/annotation` |
-| `@Cbor` | `cbor/annotation` |
-| `@Bson` | `bson/annotation` |
-| `@Proto` | `proto/annotation` |
-| `@Hjson` | `hjson/annotation` |
-| `@Hocon` | `hocon/annotation` |
-| `@Ini` | `ini/annotation` |
-| `@Markdown` | `markdown/annotation` |
-| `@Parquet` | `parquet/annotation` |
-
-### Group D: marshall-rdf
-
-| Annotation | Package |
-|---|---|
-| `@Rdf` | `jena/annotation` |
-
-### Group E: REST annotations (juneau-rest-server)
-
-These annotations also have `on()`/`onClass()` but use a different application
mechanism (RestContext, not BeanContext). They are **out of scope** for this
plan — their `on`/`onClass` serve a different purpose (REST method/class
targeting) and do not need the `XApply` split.
-
-| Annotation |
-|---|
-| `@Rest`, `@RestGet`, `@RestPut`, `@RestPost`, `@RestDelete`, `@RestPatch`,
`@RestOptions`, `@RestOp` |
-| `@RestStartCall`, `@RestPreCall`, `@RestPostCall`, `@RestEndCall`,
`@RestInit`, `@RestPostInit`, `@RestDestroy` |
-
-Note: REST operation annotations (`@Rest` through `@RestOp`) have
`@ContextApply` but their appliers configure the REST context, not
`BeanContext`. Their `on()` identifies which REST class/method the annotation
applies to. REST lifecycle annotations (`@RestStartCall` through
`@RestDestroy`) have `on()` but no `@ContextApply`.
-
----
-
-## Implementation plan
-
-### Step 1: Create the `@XApply` template pattern
-
-Define the structural pattern that all `@XApply` annotations will follow.
-
-For an annotation `@X` with both `on` and `onClass`:
-
-```java
-// In the same package as the original @X (stays in marshall)
-@Documented
-@Target(TYPE)
-@Retention(RUNTIME)
-@Repeatable(XApply.Array.class)
-@ContextApply(XApplyAnnotation.Applier.class)
-public @interface XApply {
- X value(); // the wrapped annotation
- String[] on() default {};
- Class<?>[] onClass() default {};
-
- @Documented
- @Target(TYPE)
- @Retention(RUNTIME)
- public @interface Array {
- XApply[] value();
- }
-}
-```
-
-For `@X` with `on()` only (no `onClass`):
-
-```java
-@Documented
-@Target(TYPE)
-@Retention(RUNTIME)
-@Repeatable(XApply.Array.class)
-@ContextApply(XApplyAnnotation.Applier.class)
-public @interface XApply {
- X value();
- String[] on() default {};
-
- @Documented @Target(TYPE) @Retention(RUNTIME)
- public @interface Array { XApply[] value(); }
-}
-```
-
-### Step 2: Create `XApplyAnnotation` companion classes
-
-Each `@XApply` gets a companion `XApplyAnnotation.java` with:
-
-- Builder class extending the appropriate `AppliedAnnotationObject` or
`AppliedOnClassAnnotationObject` builder base
-- `Applier` inner class that:
- 1. Reads `on`/`onClass` from the `@XApply`
- 2. Reads the nested `@X` annotation
- 3. Calls `b.annotations(...)` to register the nested annotation against the
targets
-- `copy()` method for VarResolver resolution
-- `DEFAULT`, `create()`, `Array` container
-
-The applier logic is essentially the same as today's applier, just relocated
from `XAnnotation.Apply` to `XApplyAnnotation.Applier`.
-
-### Step 3: Strip `on`/`onClass`/`@ContextApply` from `@X` annotations
-
-For each annotation in Groups A-D:
-
-1. Remove `String[] on() default {}` attribute
-2. Remove `Class<?>[] onClass() default {}` attribute (where present)
-3. Remove `@ContextApply(XAnnotation.Applier.class)` meta-annotation
-4. Remove the `Applier`/`Apply` inner class from `XAnnotation.java`
-5. Remove `on`/`onClass` from the `XAnnotation.java` Builder class
-6. Change builder base from `AppliedOnClassAnnotationObject.BuilderTMF` to a
non-targeting base
-7. Change private Object class from `AppliedOnClassAnnotationObject` to base
`AnnotationObject` or similar
-8. Keep `@Repeatable(XAnnotation.Array.class)` on `@X` itself (repeatability
for inline use is still valid)
-
-### Step 4: Migrate all call sites
-
-For each usage of `@X(on = ..., ...)` or `@X(onClass = ..., ...)` in the
codebase:
-
-1. **Declarative (annotation on class):** Rewrite to `@XApply(on = ..., value
= @X(...))`
-2. **Programmatic (builder API):** Rewrite from
`XAnnotation.create().on(...).build()` to
`XApplyAnnotation.create().on(...).value(XAnnotation.create()...build()).build()`
-
-### Step 5: Update tests
-
-Every `*Annotation_Test.java` file needs updates for the new structure. Also
update integration tests that use `on`/`onClass` declaratively.
-
-### Step 6: Update `AnnotationWorkList` and `Context.Builder`
-
-The annotation discovery machinery (`CONTEXT_APPLY_FILTER`, `traverse()`,
`applyAnnotation()`) should work unchanged because `@XApply` carries
`@ContextApply` and its applier handles the nesting. Verify this with tests.
-
-### Step 7: Release notes
-
-Document the breaking change with before/after examples for common patterns.
-
----
-
-## Ordering
-
-This work is a **prerequisite** for Phase 2 of
`decouple-rest-common-from-marshall.md` (moving `@Schema` to commons). However,
it can be done incrementally:
-
-1. **Start with one annotation** (e.g. `@Schema`) as a proof-of-concept
-2. **Sweep remaining Group A** annotations
-3. **Sweep Group B** (`on()`-only annotations)
-4. **Sweep Group C** (format-specific annotations)
-5. **Sweep Group D** (`@Rdf`)
-
-Each step should compile and pass tests independently.
-
----
-
-## Files affected (estimated)
-
-| Category | Count |
-|---|---|
-| New `@XApply` annotation files | ~30 |
-| New `XApplyAnnotation.java` companion files | ~30 |
-| Modified `@X` annotation files (strip `on`/`onClass`) | ~30 |
-| Modified `XAnnotation.java` files (remove Applier) | ~30 |
-| Migrated call sites (declarative `on`/`onClass` usage) | ~80 |
-| Updated test files | ~40 |
-| Release notes | 1 |