You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2021/12/19 17:50:43 UTC
[juneau] branch master updated: Remove JSO marshallers.
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 7770a20 Remove JSO marshallers.
7770a20 is described below
commit 7770a20d521492d971c6affc06a030170aee4aac
Author: JamesBognar <ja...@salesforce.com>
AuthorDate: Sun Dec 19 12:50:13 2021 -0500
Remove JSO marshallers.
---
.../src/main/java/org/apache/juneau/Context.java | 4 -
.../org/apache/juneau/jso/JsoBeanPropertyMeta.java | 42 --
.../java/org/apache/juneau/jso/JsoClassMeta.java | 47 --
.../org/apache/juneau/jso/JsoMetaProvider.java | 37 -
.../main/java/org/apache/juneau/jso/JsoParser.java | 645 ------------------
.../org/apache/juneau/jso/JsoParserSession.java | 194 ------
.../java/org/apache/juneau/jso/JsoSerializer.java | 749 ---------------------
.../apache/juneau/jso/JsoSerializerSession.java | 197 ------
.../java/org/apache/juneau/jso/annotation/Jso.java | 140 ----
.../juneau/jso/annotation/JsoAnnotation.java | 204 ------
.../apache/juneau/jso/annotation/JsoConfig.java | 55 --
.../juneau/jso/annotation/JsoConfigAnnotation.java | 62 --
.../org/apache/juneau/jso/annotation/package.html | 41 --
.../main/java/org/apache/juneau/jso/package.html | 41 --
.../main/java/org/apache/juneau/marshall/Jso.java | 70 --
.../apache/juneau/rest/jaxrs/BasicProvider.java | 4 +-
.../rest/springboot/BasicSpringRestServlet.java | 6 -
.../org/apache/juneau/rest/BasicRestServlet.java | 6 -
.../apache/juneau/jso/JsoConfigAnnotationTest.java | 66 --
.../juneau/jso/annotation/JsoAnnotation_Test.java | 114 ----
.../java/org/apache/juneau/marshall/JsoTest.java | 29 -
21 files changed, 1 insertion(+), 2752 deletions(-)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
index b27fcc7..22f92da 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
@@ -34,7 +34,6 @@ import org.apache.juneau.collections.*;
import org.apache.juneau.csv.annotation.*;
import org.apache.juneau.html.annotation.*;
import org.apache.juneau.internal.*;
-import org.apache.juneau.jso.annotation.*;
import org.apache.juneau.json.annotation.*;
import org.apache.juneau.jsonschema.annotation.*;
import org.apache.juneau.msgpack.annotation.*;
@@ -354,7 +353,6 @@ public abstract class Context implements MetaProvider {
* <li class ='ja'>{@link CsvConfig}
* <li class ='ja'>{@link HtmlConfig}
* <li class ='ja'>{@link HtmlDocConfig}
- * <li class ='ja'>{@link JsoConfig}
* <li class ='ja'>{@link JsonConfig}
* <li class ='ja'>{@link JsonSchemaConfig}
* <li class ='ja'>{@link MsgPackConfig}
@@ -419,7 +417,6 @@ public abstract class Context implements MetaProvider {
* <li class ='ja'>{@link CsvConfig}
* <li class ='ja'>{@link HtmlConfig}
* <li class ='ja'>{@link HtmlDocConfig}
- * <li class ='ja'>{@link JsoConfig}
* <li class ='ja'>{@link JsonConfig}
* <li class ='ja'>{@link JsonSchemaConfig}
* <li class ='ja'>{@link MsgPackConfig}
@@ -537,7 +534,6 @@ public abstract class Context implements MetaProvider {
* <li class='ja'>{@link org.apache.juneau.annotation.UriAnnotation}
* <li class='ja'>{@link org.apache.juneau.csv.annotation.CsvAnnotation}
* <li class='ja'>{@link org.apache.juneau.html.annotation.HtmlAnnotation}
- * <li class='ja'>{@link org.apache.juneau.jso.annotation.JsoAnnotation}
* <li class='ja'>{@link org.apache.juneau.json.annotation.JsonAnnotation}
* <li class='ja'>{@link org.apache.juneau.http.annotation.SchemaAnnotation}
* <li class='ja'>{@link org.apache.juneau.msgpack.annotation.MsgPackAnnotation}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoBeanPropertyMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoBeanPropertyMeta.java
deleted file mode 100644
index 1324dcf..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoBeanPropertyMeta.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import org.apache.juneau.*;
-import org.apache.juneau.jso.annotation.*;
-
-/**
- * Metadata on bean properties specific to the JSO serializers and parsers pulled from the {@link Jso @Jso}
- * annotation on the bean property.
- */
-public final class JsoBeanPropertyMeta extends ExtendedBeanPropertyMeta {
-
- /**
- * Default instance.
- */
- public static final JsoBeanPropertyMeta DEFAULT = new JsoBeanPropertyMeta();
-
- /**
- * Constructor.
- *
- * @param bpm The metadata of the bean property of this additional metadata.
- * @param mp JSO metadata provider (for finding information about other artifacts).
- */
- public JsoBeanPropertyMeta(BeanPropertyMeta bpm, JsoMetaProvider mp) {
- super(bpm);
- }
-
- private JsoBeanPropertyMeta() {
- super(null);
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoClassMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoClassMeta.java
deleted file mode 100644
index 82e8ffb..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoClassMeta.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.jso.annotation.*;
-
-/**
- * Metadata on classes specific to the JSO serializers and parsers pulled from the {@link Jso @Jso} annotation on
- * the class.
- */
-public class JsoClassMeta extends ExtendedClassMeta {
-
- private final List<Jso> jsos;
-
- /**
- * Constructor.
- *
- * @param cm The class that this annotation is defined on.
- * @param mp JSO metadata provider (for finding information about other artifacts).
- */
- public JsoClassMeta(ClassMeta<?> cm, JsoMetaProvider mp) {
- super(cm);
- this.jsos = cm.getAnnotations(Jso.class);
- }
-
- /**
- * Returns the {@link Jso @Jso} annotations defined on the class.
- *
- * @return An unmodifiable list of annotations ordered parent-to-child, or an empty list if not found.
- */
- protected List<Jso> getAnnotations() {
- return jsos;
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoMetaProvider.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoMetaProvider.java
deleted file mode 100644
index beef60b..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoMetaProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import org.apache.juneau.*;
-
-/**
- * Interface for providing access to {@link JsoClassMeta} and {@link JsoBeanPropertyMeta} objects.
- */
-public interface JsoMetaProvider extends MetaProvider {
-
- /**
- * Returns the language-specific metadata on the specified class.
- *
- * @param cm The class to return the metadata on.
- * @return The metadata.
- */
- JsoClassMeta getJsoClassMeta(ClassMeta<?> cm);
-
- /**
- * Returns the language-specific metadata on the specified bean property.
- *
- * @param bpm The bean property to return the metadata on.
- * @return The metadata.
- */
- JsoBeanPropertyMeta getJsoBeanPropertyMeta(BeanPropertyMeta bpm);
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoParser.java
deleted file mode 100644
index 3ee9160..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoParser.java
+++ /dev/null
@@ -1,645 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import java.io.*;
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.http.header.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.utils.*;
-
-/**
- * Parses POJOs from HTTP responses as Java {@link ObjectInputStream ObjectInputStreams}.
- *
- * <h5 class='topic'>Media types</h5>
- *
- * Consumes <c>Content-Type</c> types: <bc>application/x-java-serialized-object</bc>
- */
-public final class JsoParser extends InputStreamParser implements JsoMetaProvider {
-
- //-------------------------------------------------------------------------------------------------------------------
- // Static
- //-------------------------------------------------------------------------------------------------------------------
-
- /** Default parser, all default settings.*/
- public static final JsoParser DEFAULT = new JsoParser(create());
-
- /**
- * Creates a new builder for this object.
- *
- * @return A new builder.
- */
- public static Builder create() {
- return new Builder();
- }
-
- //-------------------------------------------------------------------------------------------------------------------
- // Builder
- //-------------------------------------------------------------------------------------------------------------------
-
- /**
- * Builder class.
- */
- @FluentSetters
- public static class Builder extends InputStreamParser.Builder {
-
- private static final Cache<HashKey,JsoParser> CACHE = Cache.of(HashKey.class, JsoParser.class).build();
-
- /**
- * Constructor, default settings.
- */
- protected Builder() {
- super();
- consumes("application/x-java-serialized-object");
- type(JsoParser.class);
- }
-
- /**
- * Copy constructor.
- *
- * @param copyFrom The bean to copy from.
- */
- protected Builder(JsoParser copyFrom) {
- super(copyFrom);
- }
-
- /**
- * Copy constructor.
- *
- * @param copyFrom The builder to copy from.
- */
- protected Builder(Builder copyFrom) {
- super(copyFrom);
- }
-
- @Override /* Context.Builder */
- public Builder copy() {
- return new Builder(this);
- }
-
- @Override /* Context.Builder */
- public JsoParser build() {
- return build(JsoParser.class, CACHE);
- }
-
- @Override /* Context.Builder */
- public HashKey hashKey() {
- return super.hashKey();
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Properties
- //-----------------------------------------------------------------------------------------------------------------
-
- // <FluentSetters>
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder annotations(Annotation...values) {
- super.annotations(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder apply(AnnotationWorkList work) {
- super.apply(work);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder applyAnnotations(java.lang.Class<?>...fromClasses) {
- super.applyAnnotations(fromClasses);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder applyAnnotations(Method...fromMethods) {
- super.applyAnnotations(fromMethods);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder debug() {
- super.debug();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder debug(boolean value) {
- super.debug(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder impl(Context value) {
- super.impl(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder type(Class<?> value) {
- super.type(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanClassVisibility(Visibility value) {
- super.beanClassVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanConstructorVisibility(Visibility value) {
- super.beanConstructorVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanDictionary(java.lang.Class<?>...values) {
- super.beanDictionary(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanFieldVisibility(Visibility value) {
- super.beanFieldVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
- super.beanInterceptor(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanMapPutReturnsOldValue() {
- super.beanMapPutReturnsOldValue();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanMethodVisibility(Visibility value) {
- super.beanMethodVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanProperties(Map<String,Object> values) {
- super.beanProperties(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanProperties(Class<?> beanClass, String properties) {
- super.beanProperties(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanProperties(String beanClassName, String properties) {
- super.beanProperties(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesExcludes(Map<String,Object> values) {
- super.beanPropertiesExcludes(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesExcludes(Class<?> beanClass, String properties) {
- super.beanPropertiesExcludes(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesExcludes(String beanClassName, String properties) {
- super.beanPropertiesExcludes(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesReadOnly(Map<String,Object> values) {
- super.beanPropertiesReadOnly(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesReadOnly(Class<?> beanClass, String properties) {
- super.beanPropertiesReadOnly(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesReadOnly(String beanClassName, String properties) {
- super.beanPropertiesReadOnly(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesWriteOnly(Map<String,Object> values) {
- super.beanPropertiesWriteOnly(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesWriteOnly(Class<?> beanClass, String properties) {
- super.beanPropertiesWriteOnly(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesWriteOnly(String beanClassName, String properties) {
- super.beanPropertiesWriteOnly(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beansRequireDefaultConstructor() {
- super.beansRequireDefaultConstructor();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beansRequireSerializable() {
- super.beansRequireSerializable();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beansRequireSettersForGetters() {
- super.beansRequireSettersForGetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder dictionaryOn(Class<?> on, java.lang.Class<?>...values) {
- super.dictionaryOn(on, values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableBeansRequireSomeProperties() {
- super.disableBeansRequireSomeProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableIgnoreMissingSetters() {
- super.disableIgnoreMissingSetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableIgnoreTransientFields() {
- super.disableIgnoreTransientFields();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableIgnoreUnknownNullBeanProperties() {
- super.disableIgnoreUnknownNullBeanProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableInterfaceProxies() {
- super.disableInterfaceProxies();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T> Builder example(Class<T> pojoClass, T o) {
- super.example(pojoClass, o);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T> Builder example(Class<T> pojoClass, String json) {
- super.example(pojoClass, json);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder findFluentSetters() {
- super.findFluentSetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder findFluentSetters(Class<?> on) {
- super.findFluentSetters(on);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder ignoreInvocationExceptionsOnGetters() {
- super.ignoreInvocationExceptionsOnGetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder ignoreInvocationExceptionsOnSetters() {
- super.ignoreInvocationExceptionsOnSetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder ignoreUnknownBeanProperties() {
- super.ignoreUnknownBeanProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder implClass(Class<?> interfaceClass, Class<?> implClass) {
- super.implClass(interfaceClass, implClass);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder implClasses(Map<Class<?>,Class<?>> values) {
- super.implClasses(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder interfaceClass(Class<?> on, Class<?> value) {
- super.interfaceClass(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder interfaces(java.lang.Class<?>...value) {
- super.interfaces(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder locale(Locale value) {
- super.locale(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder mediaType(MediaType value) {
- super.mediaType(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder notBeanClasses(java.lang.Class<?>...values) {
- super.notBeanClasses(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder notBeanPackages(String...values) {
- super.notBeanPackages(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder propertyNamer(Class<? extends org.apache.juneau.PropertyNamer> value) {
- super.propertyNamer(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder propertyNamer(Class<?> on, Class<? extends org.apache.juneau.PropertyNamer> value) {
- super.propertyNamer(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder sortProperties() {
- super.sortProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder sortProperties(java.lang.Class<?>...on) {
- super.sortProperties(on);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder stopClass(Class<?> on, Class<?> value) {
- super.stopClass(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T, S> Builder swap(Class<T> normalClass, Class<S> swappedClass, ThrowingFunction<T,S> swapFunction) {
- super.swap(normalClass, swappedClass, swapFunction);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T, S> Builder swap(Class<T> normalClass, Class<S> swappedClass, ThrowingFunction<T,S> swapFunction, ThrowingFunction<S,T> unswapFunction) {
- super.swap(normalClass, swappedClass, swapFunction, unswapFunction);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder swaps(java.lang.Class<?>...values) {
- super.swaps(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder timeZone(TimeZone value) {
- super.timeZone(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder typeName(Class<?> on, String value) {
- super.typeName(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder typePropertyName(String value) {
- super.typePropertyName(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder typePropertyName(Class<?> on, String value) {
- super.typePropertyName(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder useEnumNames() {
- super.useEnumNames();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder useJavaBeanIntrospector() {
- super.useJavaBeanIntrospector();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder autoCloseStreams() {
- super.autoCloseStreams();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder autoCloseStreams(boolean value) {
- super.autoCloseStreams(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder consumes(String value) {
- super.consumes(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder debugOutputLines(int value) {
- super.debugOutputLines(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder listener(Class<? extends org.apache.juneau.parser.ParserListener> value) {
- super.listener(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder strict() {
- super.strict();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder strict(boolean value) {
- super.strict(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder trimStrings() {
- super.trimStrings();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder trimStrings(boolean value) {
- super.trimStrings(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder unbuffered() {
- super.unbuffered();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.Parser.Builder */
- public Builder unbuffered(boolean value) {
- super.unbuffered(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.InputStreamParser.Builder */
- public Builder binaryFormat(BinaryFormat value) {
- super.binaryFormat(value);
- return this;
- }
-
- // </FluentSetters>
- }
-
- //-------------------------------------------------------------------------------------------------------------------
- // Instance
- //-------------------------------------------------------------------------------------------------------------------
-
- private final Map<ClassMeta<?>,JsoClassMeta> jsoClassMetas = new ConcurrentHashMap<>();
- private final Map<BeanPropertyMeta,JsoBeanPropertyMeta> jsoBeanPropertyMetas = new ConcurrentHashMap<>();
-
- /**
- * Constructor.
- *
- * @param builder The builder for this object.
- */
- protected JsoParser(Builder builder) {
- super(builder);
- }
-
- @Override /* Context */
- public Builder copy() {
- return new Builder(this);
- }
-
- @Override /* Context */
- public JsoParserSession.Builder createSession() {
- return JsoParserSession.create(this);
- }
-
- @Override /* Context */
- public JsoParserSession getSession() {
- return createSession().build();
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Extended metadata
- //-----------------------------------------------------------------------------------------------------------------
-
- @Override /* JsoMetaProvider */
- public JsoClassMeta getJsoClassMeta(ClassMeta<?> cm) {
- JsoClassMeta m = jsoClassMetas.get(cm);
- if (m == null) {
- m = new JsoClassMeta(cm, this);
- jsoClassMetas.put(cm, m);
- }
- return m;
- }
-
- @Override /* JsoMetaProvider */
- public JsoBeanPropertyMeta getJsoBeanPropertyMeta(BeanPropertyMeta bpm) {
- if (bpm == null)
- return JsoBeanPropertyMeta.DEFAULT;
- JsoBeanPropertyMeta m = jsoBeanPropertyMetas.get(bpm);
- if (m == null) {
- m = new JsoBeanPropertyMeta(bpm.getDelegateFor(), this);
- jsoBeanPropertyMetas.put(bpm, m);
- }
- return m;
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoParserSession.java
deleted file mode 100644
index 0420f5b..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoParserSession.java
+++ /dev/null
@@ -1,194 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.function.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.http.header.*;
-import org.apache.juneau.httppart.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.*;
-
-/**
- * Session object that lives for the duration of a single use of {@link JsoParser}.
- *
- * <p>
- * This class is NOT thread safe.
- * It is typically discarded after one-time use although it can be reused against multiple inputs.
- */
-@SuppressWarnings("unchecked")
-public class JsoParserSession extends InputStreamParserSession {
-
- //-------------------------------------------------------------------------------------------------------------------
- // Static
- //-------------------------------------------------------------------------------------------------------------------
-
- /**
- * Creates a new builder for this object.
- *
- * @param ctx The context creating this session.
- * @return A new builder.
- */
- public static Builder create(JsoParser ctx) {
- return new Builder(ctx);
- }
-
- //-------------------------------------------------------------------------------------------------------------------
- // Builder
- //-------------------------------------------------------------------------------------------------------------------
-
- /**
- * Builder class.
- */
- @FluentSetters
- public static class Builder extends InputStreamParserSession.Builder {
-
- JsoParser ctx;
-
- /**
- * Constructor
- *
- * @param ctx The context creating this session.
- */
- protected Builder(JsoParser ctx) {
- super(ctx);
- this.ctx = ctx;
- }
-
- @Override
- public JsoParserSession build() {
- return new JsoParserSession(this);
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public <T> Builder apply(Class<T> type, Consumer<T> apply) {
- super.apply(type, apply);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder debug(Boolean value) {
- super.debug(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder properties(Map<String,Object> value) {
- super.properties(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder property(String key, Object value) {
- super.property(key, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder unmodifiable() {
- super.unmodifiable();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder locale(Locale value) {
- super.locale(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder localeDefault(Locale value) {
- super.localeDefault(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder mediaType(MediaType value) {
- super.mediaType(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder mediaTypeDefault(MediaType value) {
- super.mediaTypeDefault(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder timeZone(TimeZone value) {
- super.timeZone(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder timeZoneDefault(TimeZone value) {
- super.timeZoneDefault(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.ParserSession.Builder */
- public Builder javaMethod(Method value) {
- super.javaMethod(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.ParserSession.Builder */
- public Builder outer(Object value) {
- super.outer(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.ParserSession.Builder */
- public Builder schema(HttpPartSchema value) {
- super.schema(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.parser.ParserSession.Builder */
- public Builder schemaDefault(HttpPartSchema value) {
- super.schemaDefault(value);
- return this;
- }
-
- // </FluentSetters>
- }
-
- //-------------------------------------------------------------------------------------------------------------------
- // Instance
- //-------------------------------------------------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param builder The builder for this object.
- */
- protected JsoParserSession(Builder builder) {
- super(builder);
- }
-
- @Override /* ParserSession */
- protected <T> T doParse(ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException {
- ObjectInputStream ois = new ObjectInputStream(pipe.getInputStream());
- try {
- return (T)ois.readObject();
- } catch (ClassNotFoundException e) {
- throw new ParseException(e);
- }
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoSerializer.java
deleted file mode 100644
index 9320d9c..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoSerializer.java
+++ /dev/null
@@ -1,749 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import java.io.*;
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.http.header.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.utils.*;
-
-/**
- * Serializes POJOs to HTTP responses as Java Serialized Object {@link ObjectOutputStream ObjectOutputStreams}.
- *
- * <h5 class='topic'>Media types</h5>
- *
- * Handles <c>Accept</c> types: <bc>application/x-java-serialized-object</bc>
- * <p>
- * Produces <c>Content-Type</c> types: <bc>application/x-java-serialized-object</bc>
- */
-public class JsoSerializer extends OutputStreamSerializer implements JsoMetaProvider {
-
- //-------------------------------------------------------------------------------------------------------------------
- // Static
- //-------------------------------------------------------------------------------------------------------------------
-
- /** Default serializer, all default settings.*/
- public static final JsoSerializer DEFAULT = new JsoSerializer(create());
-
- /**
- * Creates a new builder for this object.
- *
- * @return A new builder.
- */
- public static Builder create() {
- return new Builder();
- }
-
- //-------------------------------------------------------------------------------------------------------------------
- // Builder
- //-------------------------------------------------------------------------------------------------------------------
-
- /**
- * Builder class.
- */
- @FluentSetters
- public static class Builder extends OutputStreamSerializer.Builder {
-
- private static final Cache<HashKey,JsoSerializer> CACHE = Cache.of(HashKey.class, JsoSerializer.class).build();
-
- /**
- * Constructor, default settings.
- */
- protected Builder() {
- super();
- produces("application/x-java-serialized-object");
- type(JsoSerializer.class);
- }
-
- /**
- * Copy constructor.
- *
- * @param copyFrom The bean to copy from.
- */
- protected Builder(JsoSerializer copyFrom) {
- super(copyFrom);
- }
-
- /**
- * Copy constructor.
- *
- * @param copyFrom The builder to copy from.
- */
- protected Builder(Builder copyFrom) {
- super(copyFrom);
- }
-
- @Override /* Context.Builder */
- public Builder copy() {
- return new Builder(this);
- }
-
- @Override /* Context.Builder */
- public JsoSerializer build() {
- return build(JsoSerializer.class, CACHE);
- }
-
- @Override /* Context.Builder */
- public HashKey hashKey() {
- return super.hashKey();
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Properties
- //-----------------------------------------------------------------------------------------------------------------
-
- // <FluentSetters>
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder annotations(Annotation...values) {
- super.annotations(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder apply(AnnotationWorkList work) {
- super.apply(work);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder applyAnnotations(java.lang.Class<?>...fromClasses) {
- super.applyAnnotations(fromClasses);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder applyAnnotations(Method...fromMethods) {
- super.applyAnnotations(fromMethods);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder debug() {
- super.debug();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder debug(boolean value) {
- super.debug(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder impl(Context value) {
- super.impl(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.Context.Builder */
- public Builder type(Class<?> value) {
- super.type(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanClassVisibility(Visibility value) {
- super.beanClassVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanConstructorVisibility(Visibility value) {
- super.beanConstructorVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanDictionary(java.lang.Class<?>...values) {
- super.beanDictionary(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanFieldVisibility(Visibility value) {
- super.beanFieldVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
- super.beanInterceptor(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanMapPutReturnsOldValue() {
- super.beanMapPutReturnsOldValue();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanMethodVisibility(Visibility value) {
- super.beanMethodVisibility(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanProperties(Map<String,Object> values) {
- super.beanProperties(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanProperties(Class<?> beanClass, String properties) {
- super.beanProperties(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanProperties(String beanClassName, String properties) {
- super.beanProperties(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesExcludes(Map<String,Object> values) {
- super.beanPropertiesExcludes(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesExcludes(Class<?> beanClass, String properties) {
- super.beanPropertiesExcludes(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesExcludes(String beanClassName, String properties) {
- super.beanPropertiesExcludes(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesReadOnly(Map<String,Object> values) {
- super.beanPropertiesReadOnly(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesReadOnly(Class<?> beanClass, String properties) {
- super.beanPropertiesReadOnly(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesReadOnly(String beanClassName, String properties) {
- super.beanPropertiesReadOnly(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesWriteOnly(Map<String,Object> values) {
- super.beanPropertiesWriteOnly(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesWriteOnly(Class<?> beanClass, String properties) {
- super.beanPropertiesWriteOnly(beanClass, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beanPropertiesWriteOnly(String beanClassName, String properties) {
- super.beanPropertiesWriteOnly(beanClassName, properties);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beansRequireDefaultConstructor() {
- super.beansRequireDefaultConstructor();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beansRequireSerializable() {
- super.beansRequireSerializable();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder beansRequireSettersForGetters() {
- super.beansRequireSettersForGetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder dictionaryOn(Class<?> on, java.lang.Class<?>...values) {
- super.dictionaryOn(on, values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableBeansRequireSomeProperties() {
- super.disableBeansRequireSomeProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableIgnoreMissingSetters() {
- super.disableIgnoreMissingSetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableIgnoreTransientFields() {
- super.disableIgnoreTransientFields();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableIgnoreUnknownNullBeanProperties() {
- super.disableIgnoreUnknownNullBeanProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder disableInterfaceProxies() {
- super.disableInterfaceProxies();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T> Builder example(Class<T> pojoClass, T o) {
- super.example(pojoClass, o);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T> Builder example(Class<T> pojoClass, String json) {
- super.example(pojoClass, json);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder findFluentSetters() {
- super.findFluentSetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder findFluentSetters(Class<?> on) {
- super.findFluentSetters(on);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder ignoreInvocationExceptionsOnGetters() {
- super.ignoreInvocationExceptionsOnGetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder ignoreInvocationExceptionsOnSetters() {
- super.ignoreInvocationExceptionsOnSetters();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder ignoreUnknownBeanProperties() {
- super.ignoreUnknownBeanProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder implClass(Class<?> interfaceClass, Class<?> implClass) {
- super.implClass(interfaceClass, implClass);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder implClasses(Map<Class<?>,Class<?>> values) {
- super.implClasses(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder interfaceClass(Class<?> on, Class<?> value) {
- super.interfaceClass(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder interfaces(java.lang.Class<?>...value) {
- super.interfaces(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder locale(Locale value) {
- super.locale(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder mediaType(MediaType value) {
- super.mediaType(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder notBeanClasses(java.lang.Class<?>...values) {
- super.notBeanClasses(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder notBeanPackages(String...values) {
- super.notBeanPackages(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder propertyNamer(Class<? extends org.apache.juneau.PropertyNamer> value) {
- super.propertyNamer(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder propertyNamer(Class<?> on, Class<? extends org.apache.juneau.PropertyNamer> value) {
- super.propertyNamer(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder sortProperties() {
- super.sortProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder sortProperties(java.lang.Class<?>...on) {
- super.sortProperties(on);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder stopClass(Class<?> on, Class<?> value) {
- super.stopClass(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T, S> Builder swap(Class<T> normalClass, Class<S> swappedClass, ThrowingFunction<T,S> swapFunction) {
- super.swap(normalClass, swappedClass, swapFunction);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public <T, S> Builder swap(Class<T> normalClass, Class<S> swappedClass, ThrowingFunction<T,S> swapFunction, ThrowingFunction<S,T> unswapFunction) {
- super.swap(normalClass, swappedClass, swapFunction, unswapFunction);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder swaps(java.lang.Class<?>...values) {
- super.swaps(values);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder timeZone(TimeZone value) {
- super.timeZone(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder typeName(Class<?> on, String value) {
- super.typeName(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder typePropertyName(String value) {
- super.typePropertyName(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder typePropertyName(Class<?> on, String value) {
- super.typePropertyName(on, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder useEnumNames() {
- super.useEnumNames();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanContextable.Builder */
- public Builder useJavaBeanIntrospector() {
- super.useJavaBeanIntrospector();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanTraverseContext.Builder */
- public Builder detectRecursions() {
- super.detectRecursions();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanTraverseContext.Builder */
- public Builder detectRecursions(boolean value) {
- super.detectRecursions(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanTraverseContext.Builder */
- public Builder ignoreRecursions() {
- super.ignoreRecursions();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanTraverseContext.Builder */
- public Builder ignoreRecursions(boolean value) {
- super.ignoreRecursions(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanTraverseContext.Builder */
- public Builder initialDepth(int value) {
- super.initialDepth(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanTraverseContext.Builder */
- public Builder maxDepth(int value) {
- super.maxDepth(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder accept(String value) {
- super.accept(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder addBeanTypes() {
- super.addBeanTypes();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder addBeanTypes(boolean value) {
- super.addBeanTypes(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder addRootType() {
- super.addRootType();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder addRootType(boolean value) {
- super.addRootType(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder keepNullProperties() {
- super.keepNullProperties();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder keepNullProperties(boolean value) {
- super.keepNullProperties(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder listener(Class<? extends org.apache.juneau.serializer.SerializerListener> value) {
- super.listener(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder produces(String value) {
- super.produces(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder sortCollections() {
- super.sortCollections();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder sortCollections(boolean value) {
- super.sortCollections(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder sortMaps() {
- super.sortMaps();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder sortMaps(boolean value) {
- super.sortMaps(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder trimEmptyCollections() {
- super.trimEmptyCollections();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder trimEmptyCollections(boolean value) {
- super.trimEmptyCollections(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder trimEmptyMaps() {
- super.trimEmptyMaps();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder trimEmptyMaps(boolean value) {
- super.trimEmptyMaps(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder trimStrings() {
- super.trimStrings();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder trimStrings(boolean value) {
- super.trimStrings(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder uriContext(UriContext value) {
- super.uriContext(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder uriRelativity(UriRelativity value) {
- super.uriRelativity(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.Serializer.Builder */
- public Builder uriResolution(UriResolution value) {
- super.uriResolution(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.OutputStreamSerializer.Builder */
- public Builder binaryFormat(BinaryFormat value) {
- super.binaryFormat(value);
- return this;
- }
-
- // </FluentSetters>
- }
-
- //-------------------------------------------------------------------------------------------------------------------
- // Instance
- //-------------------------------------------------------------------------------------------------------------------
-
- private final Map<ClassMeta<?>,JsoClassMeta> jsoClassMetas = new ConcurrentHashMap<>();
- private final Map<BeanPropertyMeta,JsoBeanPropertyMeta> jsoBeanPropertyMetas = new ConcurrentHashMap<>();
-
- /**
- * Constructor.
- *
- * @param builder The builder for this object.
- */
- protected JsoSerializer(Builder builder) {
- super(builder);
- }
-
- @Override /* Context */
- public Builder copy() {
- return new Builder(this);
- }
-
- @Override /* Context */
- public JsoSerializerSession.Builder createSession() {
- return JsoSerializerSession.create(this);
- }
-
- @Override /* Context */
- public JsoSerializerSession getSession() {
- return createSession().build();
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Extended metadata
- //-----------------------------------------------------------------------------------------------------------------
-
- @Override /* JsoMetaProvider */
- public JsoClassMeta getJsoClassMeta(ClassMeta<?> cm) {
- JsoClassMeta m = jsoClassMetas.get(cm);
- if (m == null) {
- m = new JsoClassMeta(cm, this);
- jsoClassMetas.put(cm, m);
- }
- return m;
- }
-
- @Override /* JsoMetaProvider */
- public JsoBeanPropertyMeta getJsoBeanPropertyMeta(BeanPropertyMeta bpm) {
- if (bpm == null)
- return JsoBeanPropertyMeta.DEFAULT;
- JsoBeanPropertyMeta m = jsoBeanPropertyMetas.get(bpm);
- if (m == null) {
- m = new JsoBeanPropertyMeta(bpm.getDelegateFor(), this);
- jsoBeanPropertyMetas.put(bpm, m);
- }
- return m;
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoSerializerSession.java
deleted file mode 100644
index 1dc4b65..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/JsoSerializerSession.java
+++ /dev/null
@@ -1,197 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.function.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.http.header.*;
-import org.apache.juneau.httppart.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Session object that lives for the duration of a single use of {@link JsoSerializer}.
- *
- * <p>
- * This class is NOT thread safe.
- * It is typically discarded after one-time use although it can be reused within the same thread.
- */
-public class JsoSerializerSession extends OutputStreamSerializerSession {
-
- //-----------------------------------------------------------------------------------------------------------------
- // Static
- //-----------------------------------------------------------------------------------------------------------------
-
- /**
- * Creates a new builder for this object.
- *
- * @param ctx The context creating this session.
- * @return A new builder.
- */
- public static Builder create(JsoSerializer ctx) {
- return new Builder(ctx);
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Builder
- //-----------------------------------------------------------------------------------------------------------------
-
- /**
- * Builder class.
- */
- @FluentSetters
- public static class Builder extends OutputStreamSerializerSession.Builder {
-
- JsoSerializer ctx;
-
- /**
- * Constructor
- *
- * @param ctx The context creating this session.
- */
- protected Builder(JsoSerializer ctx) {
- super(ctx);
- this.ctx = ctx;
- }
-
- @Override
- public JsoSerializerSession build() {
- return new JsoSerializerSession(this);
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public <T> Builder apply(Class<T> type, Consumer<T> apply) {
- super.apply(type, apply);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder debug(Boolean value) {
- super.debug(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder properties(Map<String,Object> value) {
- super.properties(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder property(String key, Object value) {
- super.property(key, value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.ContextSession.Builder */
- public Builder unmodifiable() {
- super.unmodifiable();
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder locale(Locale value) {
- super.locale(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder localeDefault(Locale value) {
- super.localeDefault(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder mediaType(MediaType value) {
- super.mediaType(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder mediaTypeDefault(MediaType value) {
- super.mediaTypeDefault(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder timeZone(TimeZone value) {
- super.timeZone(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.BeanSession.Builder */
- public Builder timeZoneDefault(TimeZone value) {
- super.timeZoneDefault(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.SerializerSession.Builder */
- public Builder javaMethod(Method value) {
- super.javaMethod(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.SerializerSession.Builder */
- public Builder resolver(VarResolverSession value) {
- super.resolver(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.SerializerSession.Builder */
- public Builder schema(HttpPartSchema value) {
- super.schema(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.SerializerSession.Builder */
- public Builder schemaDefault(HttpPartSchema value) {
- super.schemaDefault(value);
- return this;
- }
-
- @Override /* GENERATED - org.apache.juneau.serializer.SerializerSession.Builder */
- public Builder uriContext(UriContext value) {
- super.uriContext(value);
- return this;
- }
-
- // </FluentSetters>
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Instance
- //-----------------------------------------------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param builder The builder for this object.
- */
- protected JsoSerializerSession(Builder builder) {
- super(builder);
- }
-
- @Override /* OutputStreamSerializerSession */
- protected void doSerialize(SerializerPipe out, Object o) throws IOException, SerializeException {
- try (ObjectOutputStream oos = new ObjectOutputStream(out.getOutputStream())) {
- oos.writeObject(o);
- }
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/Jso.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/Jso.java
deleted file mode 100644
index 0d305c4..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/Jso.java
+++ /dev/null
@@ -1,140 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.jso.*;
-
-/**
- * Annotation that can be applied to classes, fields, and methods to tweak how they are handled by {@link JsoSerializer} and {@link JsoParser}.
- *
- * <p>
- * Can be used in the following locations:
- * <ul>
- * <li>Marshalled classes/methods/fields.
- * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when an {@link #on()} value is specified.
- * </ul>
- *
- * <ul class='seealso'>
- * </ul>
- */
-@Documented
-@Target({TYPE,FIELD,METHOD})
-@Retention(RUNTIME)
-@Inherited
-@Repeatable(JsoAnnotation.Array.class)
-@ContextApply(JsoAnnotation.Apply.class)
-public @interface Jso {
-
- /**
- * Dynamically apply this annotation to the specified classes/methods/fields.
- *
- * <p>
- * Used in conjunction with {@link org.apache.juneau.BeanContext.Builder#applyAnnotations(Class...)} to dynamically apply an annotation to an existing class/method/field.
- * It is ignored when the annotation is applied directly to classes/methods/fields.
- *
- * <h5 class='section'>Valid patterns:</h5>
- * <ul class='spaced-list'>
- * <li>Classes:
- * <ul>
- * <li>Fully qualified:
- * <ul>
- * <li><js>"com.foo.MyClass"</js>
- * </ul>
- * <li>Fully qualified inner class:
- * <ul>
- * <li><js>"com.foo.MyClass$Inner1$Inner2"</js>
- * </ul>
- * <li>Simple:
- * <ul>
- * <li><js>"MyClass"</js>
- * </ul>
- * <li>Simple inner:
- * <ul>
- * <li><js>"MyClass$Inner1$Inner2"</js>
- * <li><js>"Inner1$Inner2"</js>
- * <li><js>"Inner2"</js>
- * </ul>
- * </ul>
- * <li>Methods:
- * <ul>
- * <li>Fully qualified with args:
- * <ul>
- * <li><js>"com.foo.MyClass.myMethod(String,int)"</js>
- * <li><js>"com.foo.MyClass.myMethod(java.lang.String,int)"</js>
- * <li><js>"com.foo.MyClass.myMethod()"</js>
- * </ul>
- * <li>Fully qualified:
- * <ul>
- * <li><js>"com.foo.MyClass.myMethod"</js>
- * </ul>
- * <li>Simple with args:
- * <ul>
- * <li><js>"MyClass.myMethod(String,int)"</js>
- * <li><js>"MyClass.myMethod(java.lang.String,int)"</js>
- * <li><js>"MyClass.myMethod()"</js>
- * </ul>
- * <li>Simple:
- * <ul>
- * <li><js>"MyClass.myMethod"</js>
- * </ul>
- * <li>Simple inner class:
- * <ul>
- * <li><js>"MyClass$Inner1$Inner2.myMethod"</js>
- * <li><js>"Inner1$Inner2.myMethod"</js>
- * <li><js>"Inner2.myMethod"</js>
- * </ul>
- * </ul>
- * <li>Fields:
- * <ul>
- * <li>Fully qualified:
- * <ul>
- * <li><js>"com.foo.MyClass.myField"</js>
- * </ul>
- * <li>Simple:
- * <ul>
- * <li><js>"MyClass.myField"</js>
- * </ul>
- * <li>Simple inner class:
- * <ul>
- * <li><js>"MyClass$Inner1$Inner2.myField"</js>
- * <li><js>"Inner1$Inner2.myField"</js>
- * <li><js>"Inner2.myField"</js>
- * </ul>
- * </ul>
- * <li>A comma-delimited list of anything on this list.
- * </ul>
- *
- * <ul class='seealso'>
- * <li class='link'>{@doc DynamicallyAppliedAnnotations}
- * </ul>
- */
- 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.
- *
- * <ul class='seealso'>
- * <li class='link'>{@doc DynamicallyAppliedAnnotations}
- * </ul>
- */
- Class<?>[] onClass() default {};
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoAnnotation.java
deleted file mode 100644
index 32e6a35..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoAnnotation.java
+++ /dev/null
@@ -1,204 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.reflect.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Utility classes and methods for the {@link Jso @Jso} annotation.
- */
-public class JsoAnnotation {
-
- //-----------------------------------------------------------------------------------------------------------------
- // Static
- //-----------------------------------------------------------------------------------------------------------------
-
- /** Default value */
- public static final Jso DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static Builder create() {
- 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);
- }
-
- /**
- * Creates a copy of the specified annotation.
- *
- * @param a The annotation to copy.s
- * @param r The var resolver for resolving any variables.
- * @return A copy of the specified annotation.
- */
- public static Jso copy(Jso a, VarResolverSession r) {
- return
- create()
- .on(r.resolve(a.on()))
- .onClass(a.onClass())
- .build();
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Builder
- //-----------------------------------------------------------------------------------------------------------------
-
- /**
- * Builder class.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
- * </ul>
- */
- public static class Builder extends TargetedAnnotationTMFBuilder {
-
- /**
- * Constructor.
- */
- protected Builder() {
- super(Jso.class);
- }
-
- /**
- * Instantiates a new {@link Jso @Jso} object initialized with this builder.
- *
- * @return A new {@link Jso @Jso} object.
- */
- public Jso build() {
- return new Impl(this);
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public Builder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public Builder on(java.lang.Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public Builder onClass(java.lang.Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public Builder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public Builder on(Method...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Implementation
- //-----------------------------------------------------------------------------------------------------------------
-
- private static class Impl extends TargetedAnnotationTImpl implements Jso {
-
- Impl(Builder b) {
- super(b);
- postConstruct();
- }
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Appliers
- //-----------------------------------------------------------------------------------------------------------------
-
- /**
- * Applies targeted {@link Jso} annotations to a {@link org.apache.juneau.Context.Builder}.
- */
- public static class Apply extends AnnotationApplier<Jso,Context.Builder> {
-
- /**
- * Constructor.
- *
- * @param vr The resolver for resolving values in annotations.
- */
- public Apply(VarResolverSession vr) {
- super(Jso.class, Context.Builder.class, vr);
- }
-
- @Override
- public void apply(AnnotationInfo<Jso> ai, Context.Builder b) {
- Jso a = ai.getAnnotation();
-
- if (isEmpty(a.on()) && isEmpty(a.onClass()))
- return;
-
- b.annotations(copy(a, vr()));
- }
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // Other
- //-----------------------------------------------------------------------------------------------------------------
-
- /**
- * A collection of {@link Jso @Jso annotations}.
- */
- @Documented
- @Target({METHOD,TYPE})
- @Retention(RUNTIME)
- @Inherited
- public static @interface Array {
-
- /**
- * The child annotations.
- */
- Jso[] value();
- }
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoConfig.java
deleted file mode 100644
index 07c9f48..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoConfig.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.jso.*;
-
-/**
- * Annotation for specifying config properties defined in {@link JsoSerializer} and {@link JsoParser}.
- *
- * <p>
- * Used primarily for specifying bean configuration properties on REST classes and methods.
- */
-@Documented
-@Target({TYPE,METHOD})
-@Retention(RUNTIME)
-@Inherited
-@ContextApply({JsoConfigAnnotation.SerializerApply.class,JsoConfigAnnotation.ParserApply.class})
-public @interface JsoConfig {
-
- /**
- * Optional rank for this config.
- *
- * <p>
- * Can be used to override default ordering and application of config annotations.
- */
- int rank() default 0;
-
- //-------------------------------------------------------------------------------------------------------------------
- // JsoCommon
- //-------------------------------------------------------------------------------------------------------------------
-
- //-------------------------------------------------------------------------------------------------------------------
- // JsoSerializer
- //-------------------------------------------------------------------------------------------------------------------
-
- //-------------------------------------------------------------------------------------------------------------------
- // JsoParser
- //-------------------------------------------------------------------------------------------------------------------
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoConfigAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoConfigAnnotation.java
deleted file mode 100644
index edfb01b..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/JsoConfigAnnotation.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso.annotation;
-
-import org.apache.juneau.*;
-import org.apache.juneau.jso.*;
-import org.apache.juneau.reflect.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Utility classes and methods for the {@link JsoConfig @JsoConfig} annotation.
- */
-public class JsoConfigAnnotation {
-
- /**
- * Applies {@link JsoConfig} annotations to a {@link org.apache.juneau.jso.JsoSerializer.Builder}.
- */
- public static class SerializerApply extends AnnotationApplier<JsoConfig,JsoSerializer.Builder> {
-
- /**
- * Constructor.
- *
- * @param vr The resolver for resolving values in annotations.
- */
- public SerializerApply(VarResolverSession vr) {
- super(JsoConfig.class, JsoSerializer.Builder.class, vr);
- }
-
- @Override
- public void apply(AnnotationInfo<JsoConfig> ai, JsoSerializer.Builder b) {
- }
- }
-
- /**
- * Applies {@link JsoConfig} annotations to a {@link org.apache.juneau.jso.JsoParser.Builder}.
- */
- public static class ParserApply extends AnnotationApplier<JsoConfig,JsoParser.Builder> {
-
- /**
- * Constructor.
- *
- * @param vr The resolver for resolving values in annotations.
- */
- public ParserApply(VarResolverSession vr) {
- super(JsoConfig.class, JsoParser.Builder.class, vr);
- }
-
- @Override
- public void apply(AnnotationInfo<JsoConfig> ai, JsoParser.Builder b) {
- }
- }
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/package.html
deleted file mode 100644
index 298532e..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/annotation/package.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- *
- ***************************************************************************************************************************/
- -->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <style type="text/css">
- /* For viewing in Page Designer */
- @IMPORT url("../../../../../../javadoc.css");
-
- /* For viewing in REST interface */
- @IMPORT url("../htdocs/javadoc.css");
- body {
- margin: 20px;
- }
- </style>
- <script>
- /* Replace all @code and @link tags. */
- window.onload = function() {
- document.body.innerHTML = document.body.innerHTML.replace(/\{\@code ([^\}]+)\}/g, '<code>$1</code>');
- document.body.innerHTML = document.body.innerHTML.replace(/\{\@link (([^\}]+)\.)?([^\.\}]+)\}/g, '<code>$3</code>');
- }
- </script>
-</head>
-<body>
-<p>Java-Serialized-Object Marshalling Annotations</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/package.html b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/package.html
deleted file mode 100644
index 576ec72..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jso/package.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- *
- ***************************************************************************************************************************/
- -->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <style type="text/css">
- /* For viewing in Page Designer */
- @IMPORT url("../../../../../../javadoc.css");
-
- /* For viewing in REST interface */
- @IMPORT url("../htdocs/javadoc.css");
- body {
- margin: 20px;
- }
- </style>
- <script>
- /* Replace all @code and @link tags. */
- window.onload = function() {
- document.body.innerHTML = document.body.innerHTML.replace(/\{\@code ([^\}]+)\}/g, '<code>$1</code>');
- document.body.innerHTML = document.body.innerHTML.replace(/\{\@link (([^\}]+)\.)?([^\.\}]+)\}/g, '<code>$3</code>');
- }
- </script>
-</head>
-<body>
-<p>Java-Serialized-Object Marshalling Support</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/Jso.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/Jso.java
deleted file mode 100644
index d7b9539..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/Jso.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.marshall;
-
-import org.apache.juneau.jso.*;
-
-/**
- * A pairing of a {@link JsoSerializer} and {@link JsoParser} into a single class with convenience read/write methods.
- *
- * <p>
- * The general idea is to combine a single serializer and parser inside a simplified API for reading and writing POJOs.
- *
- * <h5 class='figure'>Examples:</h5>
- * <p class='bcode w800'>
- * <jc>// Using instance.</jc>
- * Jso jso = <jk>new</jk> Jso();
- * MyPojo myPojo = jso.read(bytes, MyPojo.<jk>class</jk>);
- * <jk>byte</jk>[] bytes = jso.write(myPojo);
- * </p>
- * <p class='bcode w800'>
- * <jc>// Using DEFAULT instance.</jc>
- * MyPojo myPojo = Jso.<jsf>DEFAULT</jsf>.read(bytes, MyPojo.<jk>class</jk>);
- * <jk>byte</jk>[] bytes = Jso.<jsf>DEFAULT</jsf>.write(myPojo);
- * </p>
- *
- * <ul class='seealso'>
- * <li class='link'>{@doc Marshalls}
- * </ul>
- */
-public class Jso extends StreamMarshall {
-
- /**
- * Default reusable instance.
- */
- public static final Jso DEFAULT = new Jso();
-
- /**
- * Constructor.
- *
- * @param s
- * The serializer to use for serializing output.
- * <br>Must not be <jk>null</jk>.
- * @param p
- * The parser to use for parsing input.
- * <br>Must not be <jk>null</jk>.
- */
- public Jso(JsoSerializer s, JsoParser p) {
- super(s, p);
- }
-
- /**
- * Constructor.
- *
- * <p>
- * Uses {@link JsoSerializer#DEFAULT} and {@link JsoParser#DEFAULT}.
- */
- public Jso() {
- this(JsoSerializer.DEFAULT, JsoParser.DEFAULT);
- }
-}
diff --git a/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java b/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java
index 50be05b..b7b50a2 100644
--- a/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java
+++ b/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/BasicProvider.java
@@ -16,7 +16,6 @@ import javax.ws.rs.*;
import javax.ws.rs.ext.*;
import org.apache.juneau.html.*;
-import org.apache.juneau.jso.*;
import org.apache.juneau.json.*;
import org.apache.juneau.rest.*;
import org.apache.juneau.soap.*;
@@ -63,8 +62,7 @@ import org.apache.juneau.xml.*;
UrlEncodingSerializer.class,
SoapXmlSerializer.class,
HtmlSerializer.class,
- UonSerializer.class,
- JsoSerializer.class
+ UonSerializer.class
},
parsers={
JsonParser.class,
diff --git a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/BasicSpringRestServlet.java b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/BasicSpringRestServlet.java
index caada64..4dfcf34 100644
--- a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/BasicSpringRestServlet.java
+++ b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/BasicSpringRestServlet.java
@@ -20,7 +20,6 @@ import org.apache.juneau.html.annotation.*;
import org.apache.juneau.http.annotation.*;
import org.apache.juneau.http.resource.*;
import org.apache.juneau.http.response.*;
-import org.apache.juneau.jso.*;
import org.apache.juneau.json.*;
import org.apache.juneau.plaintext.*;
import org.apache.juneau.rest.*;
@@ -128,11 +127,6 @@ import org.apache.juneau.xml.*;
* </table>
*
* <p>
- * It should be noted that we do NOT add {@link JsoParser} to the list of parsers since this could cause security
- * issues.
- * Use caution when using this particular parser as it could inadvertently cause code execution security holes.
- *
- * <p>
* The list of serializers and parsers can be appended to using the
* {@link Rest#serializers() @Rest(serializers)} and
* {@link Rest#parsers() @Rest(parsers)} annotations on subclasses.
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java
index 4c9e860..01efc3c 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestServlet.java
@@ -20,7 +20,6 @@ import org.apache.juneau.html.annotation.*;
import org.apache.juneau.http.annotation.*;
import org.apache.juneau.http.resource.*;
import org.apache.juneau.http.response.*;
-import org.apache.juneau.jso.*;
import org.apache.juneau.json.*;
import org.apache.juneau.plaintext.*;
import org.apache.juneau.rest.annotation.*;
@@ -127,11 +126,6 @@ import org.apache.juneau.xml.*;
* </table>
*
* <p>
- * It should be noted that we do NOT add {@link JsoParser} to the list of parsers since this could cause security
- * issues.
- * Use caution when using this particular parser as it could inadvertently cause code execution security holes.
- *
- * <p>
* The list of serializers and parsers can be appended to using the
* {@link Rest#serializers() @Rest(serializers)} and
* {@link Rest#parsers() @Rest(parsers)} annotations on subclasses.
diff --git a/juneau-utest/src/test/java/org/apache/juneau/jso/JsoConfigAnnotationTest.java b/juneau-utest/src/test/java/org/apache/juneau/jso/JsoConfigAnnotationTest.java
deleted file mode 100644
index b5b6dde..0000000
--- a/juneau-utest/src/test/java/org/apache/juneau/jso/JsoConfigAnnotationTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso;
-
-import static org.junit.runners.MethodSorters.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.jso.annotation.*;
-import org.apache.juneau.reflect.*;
-import org.junit.*;
-
-/**
- * Tests the @JsoConfig annotation.
- */
-@FixMethodOrder(NAME_ASCENDING)
-public class JsoConfigAnnotationTest {
-
- //-----------------------------------------------------------------------------------------------------------------
- // Annotation with no values.
- //-----------------------------------------------------------------------------------------------------------------
-
- @JsoConfig()
- static class B {}
- static ClassInfo b = ClassInfo.of(B.class);
-
- @Test
- public void defaultsSerializer() throws Exception {
- AnnotationWorkList al = b.getAnnotationList().getWork(null);
- JsoSerializer.create().apply(al).build().createSession();
- }
-
- @Test
- public void defaultsParser() throws Exception {
- AnnotationWorkList al = b.getAnnotationList().getWork(null);
- JsoParser.create().apply(al).build().createSession();
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- // No annotation.
- //-----------------------------------------------------------------------------------------------------------------
-
- static class C {}
- static ClassInfo c = ClassInfo.of(C.class);
-
- @Test
- public void noAnnotationSerializer() throws Exception {
- AnnotationWorkList al = c.getAnnotationList().getWork(null);
- JsoSerializer.create().apply(al).build().createSession();
- }
-
- @Test
- public void noAnnotationParser() throws Exception {
- AnnotationWorkList al = c.getAnnotationList().getWork(null);
- JsoParser.create().apply(al).build().createSession();
- }
-}
\ No newline at end of file
diff --git a/juneau-utest/src/test/java/org/apache/juneau/jso/annotation/JsoAnnotation_Test.java b/juneau-utest/src/test/java/org/apache/juneau/jso/annotation/JsoAnnotation_Test.java
deleted file mode 100644
index bb5a338..0000000
--- a/juneau-utest/src/test/java/org/apache/juneau/jso/annotation/JsoAnnotation_Test.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jso.annotation;
-
-import static org.apache.juneau.assertions.Assertions.*;
-import static org.junit.Assert.*;
-import static org.junit.runners.MethodSorters.*;
-
-import org.apache.juneau.*;
-import org.junit.*;
-
-@FixMethodOrder(NAME_ASCENDING)
-public class JsoAnnotation_Test {
-
- private static final String CNAME = JsoAnnotation_Test.class.getName();
-
- //------------------------------------------------------------------------------------------------------------------
- // Basic tests
- //------------------------------------------------------------------------------------------------------------------
-
- Jso a1 = JsoAnnotation.create()
- .on("a")
- .build();
-
- Jso a2 = JsoAnnotation.create()
- .on("a")
- .build();
-
- @Test
- public void a01_basic() {
- assertObject(a1).asJson().is(""
- + "{"
- + "on:['a'],"
- + "onClass:[]"
- + "}"
- );
- }
-
- @Test
- public void a02_testEquivalency() {
- assertObject(a1).is(a2);
- assertInteger(a1.hashCode()).is(a2.hashCode()).isNotAny(0,-1);
- }
-
- //------------------------------------------------------------------------------------------------------------------
- // PropertyStore equivalency.
- //------------------------------------------------------------------------------------------------------------------
-
- @Test
- public void b01_testEquivalencyInPropertyStores() {
- BeanContext bc1 = BeanContext.create().annotations(a1).build();
- BeanContext bc2 = BeanContext.create().annotations(a2).build();
- assertTrue(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
- public void c01_otherMethods() throws Exception {
- Jso c1 = JsoAnnotation.create(C1.class).on(C2.class).build();
- Jso c2 = JsoAnnotation.create("a").on("b").build();
- Jso c3 = JsoAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Jso c4 = JsoAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
-
- assertObject(c1).asJson().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
- assertObject(c2).asJson().contains("on:['a','b']");
- assertObject(c3).asJson().contains("on:['"+CNAME+"$C1.f1','"+CNAME+"$C2.f2']");
- assertObject(c4).asJson().contains("on:['"+CNAME+"$C1.m1()','"+CNAME+"$C2.m2()']");
- }
-
- //------------------------------------------------------------------------------------------------------------------
- // Comparison with declared annotations.
- //------------------------------------------------------------------------------------------------------------------
-
- @Jso(
- on="a"
- )
- public static class D1 {}
- Jso d1 = D1.class.getAnnotationsByType(Jso.class)[0];
-
- @Jso(
- on="a"
- )
- public static class D2 {}
- Jso d2 = D2.class.getAnnotationsByType(Jso.class)[0];
-
- @Test
- public void d01_comparisonWithDeclarativeAnnotations() {
- assertObject(d1).is(d2).is(a1);
- assertInteger(d1.hashCode()).is(d2.hashCode()).is(a1.hashCode()).isNotAny(0,-1);
- }
-}
-
diff --git a/juneau-utest/src/test/java/org/apache/juneau/marshall/JsoTest.java b/juneau-utest/src/test/java/org/apache/juneau/marshall/JsoTest.java
deleted file mode 100644
index c95f397..0000000
--- a/juneau-utest/src/test/java/org/apache/juneau/marshall/JsoTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.marshall;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.runners.MethodSorters.*;
-
-import org.junit.*;
-
-@FixMethodOrder(NAME_ASCENDING)
-public class JsoTest {
-
- StreamMarshall m = Jso.DEFAULT;
-
- @Test
- public void write1() throws Exception {
- assertEquals("foo", m.read(m.write("foo"), String.class));
- }
-}