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 38abd8a Remove deprecated code.
38abd8a is described below
commit 38abd8a82ceb13c83c175ed3514262cfc97824c7
Author: JamesBognar <[email protected]>
AuthorDate: Thu Oct 15 15:09:19 2020 -0400
Remove deprecated code.
---
.../apache/juneau/BeanConfigAnnotationTest.java | 10 +-
.../java/org/apache/juneau/BeanConfigTest.java | 3 -
.../main/java/org/apache/juneau/BeanContext.java | 89 +-----------------
.../java/org/apache/juneau/BeanContextBuilder.java | 42 ---------
...UnmodifiableBeanFilter.java => BeanFilter.java} | 22 ++---
.../BeanFilter.java => BeanFilterBuilder.java} | 101 +++++----------------
.../src/main/java/org/apache/juneau/BeanMap.java | 3 -
.../src/main/java/org/apache/juneau/BeanMeta.java | 15 +--
.../main/java/org/apache/juneau/BeanSession.java | 11 ---
.../src/main/java/org/apache/juneau/ClassMeta.java | 18 +---
.../org/apache/juneau/annotation/BeanConfig.java | 54 -----------
.../apache/juneau/annotation/BeanConfigApply.java | 7 --
.../juneau/examples/rest/RequestEchoResource.java | 7 +-
.../apache/juneau/rest/jaxrs/JuneauProvider.java | 13 ---
.../apache/juneau/rest/annotation/RestMethod.java | 42 ---------
.../rest/annotation/RestMethodAnnotation.java | 18 ----
.../rest/annotation/RestMethodConfigApply.java | 33 -------
17 files changed, 56 insertions(+), 432 deletions(-)
diff --git
a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
index f8d367c..e369e7f 100644
---
a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
+++
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
@@ -64,8 +64,8 @@ public class BeanConfigAnnotationTest {
Map.Entry e = (Map.Entry)t;
return apply(e.getKey()) + "=" +
apply(e.getValue());
}
- if (t instanceof UnmodifiableBeanFilter)
- return
((UnmodifiableBeanFilter)t).getBeanClass().getSimpleName();
+ if (t instanceof BeanFilter)
+ return
((BeanFilter)t).getBeanClass().getSimpleName();
if (t instanceof Class)
return ((Class<?>)t).getSimpleName();
if (t instanceof ClassInfo)
@@ -112,9 +112,6 @@ public class BeanConfigAnnotationTest {
dictionary_replace={A1.class,A2.class,A3.class},
dictionary_remove=A2.class,
beanFieldVisibility="$X{PRIVATE}",
- beanFilters={A1.class,A2.class},
- beanFilters_replace={A1.class,A2.class,A3.class},
- beanFilters_remove=A2.class,
beanMapPutReturnsOldValue="$X{true}",
beanMethodVisibility="$X{PRIVATE}",
beansRequireDefaultConstructor="$X{true}",
@@ -169,7 +166,6 @@ public class BeanConfigAnnotationTest {
check("PRIVATE", bc.getBeanConstructorVisibility());
check("A1,A3", bc.getBeanDictionaryClasses());
check("PRIVATE", bc.getBeanFieldVisibility());
- check("A1,A3", bc.getBeanFilters());
check("true", bc.isBeanMapPutReturnsOldValue());
check("PRIVATE", bc.getBeanMethodVisibility());
check("true", bc.isBeansRequireDefaultConstructor());
@@ -219,7 +215,6 @@ public class BeanConfigAnnotationTest {
check("PUBLIC", bc.getBeanConstructorVisibility());
check("", bc.getBeanDictionaryClasses());
check("PUBLIC", bc.getBeanFieldVisibility());
- check("", bc.getBeanFilters());
check("false", bc.isBeanMapPutReturnsOldValue());
check("PUBLIC", bc.getBeanMethodVisibility());
check("false", bc.isBeansRequireDefaultConstructor());
@@ -271,7 +266,6 @@ public class BeanConfigAnnotationTest {
check("PUBLIC", bc.getBeanConstructorVisibility());
check("", bc.getBeanDictionaryClasses());
check("PUBLIC", bc.getBeanFieldVisibility());
- check("", bc.getBeanFilters());
check("false", bc.isBeanMapPutReturnsOldValue());
check("PUBLIC", bc.getBeanMethodVisibility());
check("false", bc.isBeansRequireDefaultConstructor());
diff --git
a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigTest.java
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigTest.java
index 393c919..c976b60 100755
---
a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigTest.java
+++
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigTest.java
@@ -770,9 +770,6 @@ public class BeanConfigTest {
public static class DummyPojoSwapA extends MapSwap<A> {}
public static class DummyPojoSwapB extends MapSwap<B> {}
public static class DummyPojoSwapC extends MapSwap<C> {}
- public static class DummyBeanFilterA extends BeanFilter<A> {}
- public static class DummyBeanFilterB extends BeanFilter<B> {}
- public static class DummyBeanFilterC extends BeanFilter<C> {}
public static class C {}
private void assertSameCache(ParserBuilder p1b, ParserBuilder p2b) {
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
index 6afb857..241af65 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
@@ -40,7 +40,7 @@ import org.apache.juneau.utils.*;
* <li>
* Provides the ability to wrap beans inside {@link Map}
interfaces.
* <li>
- * Serves as a repository for metadata on POJOs, such as
associated {@link UnmodifiableBeanFilter BeanFilters},
+ * Serves as a repository for metadata on POJOs, such as
associated {@link Bean @Bean} annotations,
* {@link PropertyNamer PropertyNamers}, etc... which are used to
tailor how POJOs are serialized and parsed.
* </ul>
*
@@ -485,7 +485,6 @@ public class BeanContext extends Context implements
MetaProvider {
* <li><b>Methods:</b>
* <ul>
* <li class='jm'>{@link
org.apache.juneau.BeanContextBuilder#dictionary(Object...)}
- * <li class='jm'>{@link
org.apache.juneau.transform.BeanFilter#dictionary(Class...)}
* </ul>
* </ul>
*
@@ -658,36 +657,6 @@ public class BeanContext extends Context implements
MetaProvider {
public static final String BEAN_beanFieldVisibility = PREFIX +
".beanFieldVisibility.s";
/**
- * Configuration property: Bean filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#interfaces()} and
other methods.
- * </div>
- */
- @Deprecated
- public static final String BEAN_beanFilters = PREFIX +
".beanFilters.lo";
-
- /**
- * Configuration property: Add to bean filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#interfaces()} and
other methods.
- * </div>
- */
- @Deprecated
- public static final String BEAN_beanFilters_add = PREFIX +
".beanFilters.lo/add";
-
- /**
- * Configuration property: Remove from bean filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#interfaces()} and
other methods.
- * </div>
- */
- @Deprecated
- public static final String BEAN_beanFilters_remove = PREFIX +
".beanFilters.lo/remove";
-
- /**
* Configuration property: BeanMap.put() returns old property value.
*
* <h5 class='section'>Property:</h5>
@@ -1244,8 +1213,6 @@ public class BeanContext extends Context implements
MetaProvider {
* <li><b>Methods:</b>
* <ul>
* <li class='jm'>{@link
org.apache.juneau.BeanContextBuilder#fluentSetters()}
- * <li class='jm'>{@link
org.apache.juneau.transform.BeanFilter#fluentSetters(boolean)}
- * <li class='jm'>{@link
org.apache.juneau.transform.BeanFilter#fluentSetters()}
* </ul>
* </ul>
*
@@ -1853,7 +1820,6 @@ public class BeanContext extends Context implements
MetaProvider {
* <li><b>Methods:</b>
* <ul>
* <li class='jm'>{@link
org.apache.juneau.BeanContextBuilder#propertyNamer(Class)}
- * <li class='jm'>{@link
org.apache.juneau.transform.BeanFilter#propertyNamer(Class)}
* </ul>
* </ul>
*
@@ -1916,8 +1882,6 @@ public class BeanContext extends Context implements
MetaProvider {
* <li><b>Methods:</b>
* <ul>
* <li class='jm'>{@link
org.apache.juneau.BeanContextBuilder#sortProperties()}
- * <li class='jm'>{@link
org.apache.juneau.transform.BeanFilter#sortProperties(boolean)}
- * <li class='jm'>{@link
org.apache.juneau.transform.BeanFilter#sortProperties()}
* </ul>
* </ul>
*
@@ -2317,7 +2281,6 @@ public class BeanContext extends Context implements
MetaProvider {
private final Class<?>[] notBeanClasses;
private final List<Class<?>> beanDictionaryClasses;
private final String[] notBeanPackageNames, notBeanPackagePrefixes;
- private final UnmodifiableBeanFilter[] beanFilters;
private final PojoSwap<?,?>[] swaps;
private final Map<String,?> examples;
private final BeanRegistry beanRegistry;
@@ -2405,20 +2368,6 @@ public class BeanContext extends Context implements
MetaProvider {
notBeanPackageNames = l1.toArray(new String[l1.size()]);
notBeanPackagePrefixes = l2.toArray(new String[l2.size()]);
- LinkedList<UnmodifiableBeanFilter> lbf = new LinkedList<>();
- for (Object o : getListProperty(BEAN_beanFilters,
Object[].class)) {
- ClassInfo ci = o instanceof Class ?
ClassInfo.of((Class)o) : ClassInfo.of(o);
- if (ci.isChildOf(UnmodifiableBeanFilter.class))
-
lbf.add(castOrCreate(UnmodifiableBeanFilter.class, o));
- else if (ci.isChildOf(BeanFilter.class))
- lbf.add(castOrCreate(BeanFilter.class,
o).build());
- else if (o instanceof Class) {
- Class<?> ic = (Class<?>) o;
-
lbf.add(BeanFilter.create(ic).interfaceClass(ic).applyAnnotations(ClassInfo.of(ic).getAnnotations(Bean.class,
this)).build());
- }
- }
- beanFilters = lbf.toArray(new UnmodifiableBeanFilter[0]);
-
LinkedList<PojoSwap<?,?>> lpf = new LinkedList<>();
for (Object o : getListProperty(BEAN_swaps, Object.class)) {
if (o instanceof Class) {
@@ -2465,8 +2414,8 @@ public class BeanContext extends Context implements
MetaProvider {
if (! cmCacheCache.containsKey(beanHashCode)) {
ConcurrentHashMap<Class,ClassMeta> cm = new
ConcurrentHashMap<>();
- cm.putIfAbsent(String.class, new
ClassMeta(String.class, this, null, null, findPojoSwaps(String.class),
findChildPojoSwaps(String.class), findExample(String.class)));
- cm.putIfAbsent(Object.class, new
ClassMeta(Object.class, this, null, null, findPojoSwaps(Object.class),
findChildPojoSwaps(Object.class), findExample(Object.class)));
+ cm.putIfAbsent(String.class, new
ClassMeta(String.class, this, null, findPojoSwaps(String.class),
findChildPojoSwaps(String.class), findExample(String.class)));
+ cm.putIfAbsent(Object.class, new
ClassMeta(Object.class, this, null, findPojoSwaps(Object.class),
findChildPojoSwaps(Object.class), findExample(Object.class)));
cmCacheCache.putIfAbsent(beanHashCode, cm);
}
cmCache = cmCacheCache.get(beanHashCode);
@@ -2683,7 +2632,7 @@ public class BeanContext extends Context implements
MetaProvider {
// Make sure someone didn't already set it
while this thread was blocked.
cm = cmCache.get(type);
if (cm == null)
- cm = new ClassMeta<>(type, this,
findImplClass(type), findBeanFilter(type), findPojoSwaps(type),
findChildPojoSwaps(type), findExample(type));
+ cm = new ClassMeta<>(type, this,
findImplClass(type), findPojoSwaps(type), findChildPojoSwaps(type),
findExample(type));
}
}
if (waitForInit)
@@ -3048,22 +2997,6 @@ public class BeanContext extends Context implements
MetaProvider {
}
/**
- * Returns the {@link UnmodifiableBeanFilter} associated with the
specified class, or <jk>null</jk> if there is no bean filter
- * associated with the class.
- *
- * @param <T> The class associated with the bean filter.
- * @param c The class associated with the bean filter.
- * @return The bean filter associated with the class, or null if there
is no association.
- */
- private final <T> UnmodifiableBeanFilter findBeanFilter(Class<T> c) {
- if (c != null)
- for (UnmodifiableBeanFilter f : beanFilters)
- if
(ClassInfo.of(f.getBeanClass()).isParentOf(c))
- return f;
- return null;
- }
-
- /**
* Gets the no-arg constructor for the specified class.
*
* @param <T> The class to check.
@@ -3637,18 +3570,6 @@ public class BeanContext extends Context implements
MetaProvider {
}
/**
- * Bean filters.
- *
- *
- * @see BeanContext#BEAN_beanFilters
- * @return
- * Only look for bean fields with this specified minimum
visibility.
- */
- protected final UnmodifiableBeanFilter[] getBeanFilters() {
- return beanFilters;
- }
-
- /**
* BeanMap.put() returns old property value.
*
* @see #BEAN_beanMapPutReturnsOldValue
@@ -4094,8 +4015,6 @@ public class BeanContext extends Context implements
MetaProvider {
.a("beanConstructorVisibility",
beanConstructorVisibility)
.a("beanDictionaryClasses",
beanDictionaryClasses)
.a("beanFieldVisibility", beanFieldVisibility)
- .a("beanFilters", beanFilters)
- .a("beanMapPutReturnsOldValue",
beanMapPutReturnsOldValue)
.a("beanMethodVisibility", beanMethodVisibility)
.a("beansRequireDefaultConstructor",
beansRequireDefaultConstructor)
.a("beansRequireSerializable",
beansRequireSerializable)
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
index c03e875..a89ff1f 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
@@ -446,48 +446,6 @@ public class BeanContextBuilder extends ContextBuilder {
}
/**
- * <i><l>BeanContext</l> configuration property: </i> Bean
filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#interfaces()} and
other methods.
- * </div>
- */
- @SuppressWarnings("javadoc")
- @FluentSetter
- @Deprecated
- public BeanContextBuilder beanFilters(Object...values) {
- return prependTo(BEAN_beanFilters, values);
- }
-
- /**
- * <i><l>BeanContext</l> configuration property: </i> Bean
filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#interfaces()} and
other methods.
- * </div>
- */
- @SuppressWarnings("javadoc")
- @FluentSetter
- @Deprecated
- public BeanContextBuilder beanFiltersReplace(Object...values) {
- return set(BEAN_beanFilters, values);
- }
-
- /**
- * <i><l>BeanContext</l> configuration property: </i> Bean
filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#interfaces()} and
other methods.
- * </div>
- */
- @SuppressWarnings("javadoc")
- @FluentSetter
- @Deprecated
- public BeanContextBuilder beanFiltersRemove(Object...values) {
- return removeFrom(BEAN_beanFilters, values);
- }
-
- /**
* Bean interceptor.
*
* <p>
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/UnmodifiableBeanFilter.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilter.java
similarity index 90%
rename from
juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/UnmodifiableBeanFilter.java
rename to
juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilter.java
index ea8825d..c66802e 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/UnmodifiableBeanFilter.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilter.java
@@ -10,14 +10,14 @@
// * "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.transform;
+package org.apache.juneau;
import java.util.*;
import static org.apache.juneau.internal.ClassUtils.*;
-import org.apache.juneau.*;
import org.apache.juneau.annotation.*;
+import org.apache.juneau.transform.*;
/**
* Parent class for all bean filters.
@@ -26,14 +26,14 @@ import org.apache.juneau.annotation.*;
* Bean filters are used to control aspects of how beans are handled during
serialization and parsing.
*
* <p>
- * Bean filters are created by {@link BeanFilter} which is the programmatic
equivalent to the {@link Bean @Bean}
+ * Bean filters are created by {@link BeanFilterBuilder} which is the
programmatic equivalent to the {@link Bean @Bean}
* annotation.
*
* <ul class='seealso'>
* <li class='link'>{@doc BeanFilters}
* </ul>
*/
-public final class UnmodifiableBeanFilter {
+public final class BeanFilter {
private final Class<?> beanClass;
private final Set<String> bpi, bpx, bpro, bpwo;
@@ -48,7 +48,7 @@ public final class UnmodifiableBeanFilter {
/**
* Constructor.
*/
- UnmodifiableBeanFilter(BeanFilter<?> builder) {
+ BeanFilter(BeanFilterBuilder builder) {
this.beanClass = builder.beanClass;
this.typeName = builder.typeName;
this.bpi = new LinkedHashSet<>(builder.bpi);
@@ -71,14 +71,14 @@ public final class UnmodifiableBeanFilter {
}
/**
- * Static creator.
+ * Create a new instance of this bean filter.
*
- * @param <T> The class being filtered.
- * @param c The class being filtered.
- * @return A new instance of BeanFilterBuilder.
+ * @param <T> The bean class being filtered.
+ * @param beanClass The bean class being filtered.
+ * @return A new {@link BeanFilterBuilder} object.
*/
- public static <T> BeanFilter<T> create(Class<T> c) {
- return new BeanFilter<>(c);
+ public static <T> BeanFilterBuilder create(Class<T> beanClass) {
+ return new BeanFilterBuilder(beanClass);
}
/**
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/BeanFilter.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilterBuilder.java
similarity index 87%
rename from
juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/BeanFilter.java
rename to
juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilterBuilder.java
index 52082ad..a13844d 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/BeanFilter.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilterBuilder.java
@@ -10,54 +10,24 @@
// * "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.transform;
+package org.apache.juneau;
import static org.apache.juneau.internal.StringUtils.*;
import java.beans.*;
import java.util.*;
-import org.apache.juneau.*;
import org.apache.juneau.annotation.*;
import org.apache.juneau.collections.*;
-import org.apache.juneau.reflect.*;
+import org.apache.juneau.transform.*;
/**
- * Builder class for {@link UnmodifiableBeanFilter} objects.
+ * Builder class for {@link BeanFilter} objects.
*
* <p>
- * This class is the programmatic equivalent to the {@link Bean @Bean}
annotation.
- *
- * <p>
- * The general approach to defining bean filters is to create subclasses from
this class and call methods to
- * set various attributes
- * <p class='bcode w800'>
- * <jk>public class</jk> MyFilter <jk>extends</jk>
BeanFilterBuilder<MyBean> {
- *
- * <jc>// Must provide a no-arg constructor!</jc>
- * <jk>public</jk> MyFilter() {
- *
- * <jc>// Call one or more configuration methods.</jc>
- * bpi(<js>"foo,bar,baz"</js>);
- * sortProperties();
- * propertyNamer(PropertyNamerULC.<jk>class</jk>);
- * }
- * }
- *
- * <jc>// Register it with a serializer or parser.</jc>
- * WriterSerializer s = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- * </p>
- *
- * <ul class='seealso'>
- * <li class='link'>{@doc BeanFilters}
- * </ul>
- *
- * @param <T> The bean type that this filter applies to.
+ * This class is the programmatic equivalent to the aggregation of one or more
{@link Bean @Bean} annotations.
*/
-public class BeanFilter<T> {
+public class BeanFilterBuilder {
Class<?> beanClass;
String typeName;
@@ -75,40 +45,19 @@ public class BeanFilter<T> {
/**
* Constructor.
*
- * <p>
- * Bean class is determined through reflection of the parameter type.
- */
- protected BeanFilter() {
- beanClass = ClassInfo.of(this.getClass()).getParameterType(0,
BeanFilter.class);
- }
-
- /**
- * Constructor.
- *
* @param beanClass The bean class that this filter applies to.
*/
- protected BeanFilter(Class<?> beanClass) {
+ public BeanFilterBuilder(Class<?> beanClass) {
this.beanClass = beanClass;
}
/**
- * Create a new instance of this bean filter.
- *
- * @param <T> The bean class being filtered.
- * @param beanClass The bean class being filtered.
- * @return A new {@link BeanFilter} object.
- */
- public static <T> BeanFilter<T> create(Class<T> beanClass) {
- return new BeanFilter<>(beanClass);
- }
-
- /**
* Applies the information in the specified list of {@link Bean @Bean}
annotations to this filter.
*
* @param annotations The annotations to apply.
* @return This object (for method chaining).
*/
- public BeanFilter<T> applyAnnotations(List<Bean> annotations) {
+ public BeanFilterBuilder applyAnnotations(List<Bean> annotations) {
for (Bean b : annotations) {
@@ -183,7 +132,7 @@ public class BeanFilter<T> {
* @param value The new value for this setting.
* @return This object (for method chaining).
*/
- public BeanFilter<T> typeName(String value) {
+ public BeanFilterBuilder typeName(String value) {
this.typeName = value;
return this;
}
@@ -238,7 +187,7 @@ public class BeanFilter<T> {
* @param value The new value for this setting.
* @return This object (for method chaining).
*/
- public BeanFilter<T> interfaceClass(Class<?> value) {
+ public BeanFilterBuilder interfaceClass(Class<?> value) {
this.interfaceClass = value;
return this;
}
@@ -295,7 +244,7 @@ public class BeanFilter<T> {
* @param value The new value for this setting.
* @return This object (for method chaining).
*/
- public BeanFilter<T> stopClass(Class<?> value) {
+ public BeanFilterBuilder stopClass(Class<?> value) {
this.stopClass = value;
return this;
}
@@ -336,7 +285,7 @@ public class BeanFilter<T> {
* <br>The default is <jk>false</jk>.
* @return This object (for method chaining).
*/
- public BeanFilter<T> sortProperties(boolean value) {
+ public BeanFilterBuilder sortProperties(boolean value) {
this.sortProperties = value;
return this;
}
@@ -354,7 +303,7 @@ public class BeanFilter<T> {
*
* @return This object (for method chaining).
*/
- public BeanFilter<T> sortProperties() {
+ public BeanFilterBuilder sortProperties() {
this.sortProperties = true;
return this;
}
@@ -394,7 +343,7 @@ public class BeanFilter<T> {
* <br>The default is <jk>false</jk>.
* @return This object (for method chaining).
*/
- public BeanFilter<T> fluentSetters(boolean value) {
+ public BeanFilterBuilder fluentSetters(boolean value) {
this.fluentSetters = value;
return this;
}
@@ -412,7 +361,7 @@ public class BeanFilter<T> {
*
* @return This object (for method chaining).
*/
- public BeanFilter<T> fluentSetters() {
+ public BeanFilterBuilder fluentSetters() {
this.fluentSetters = true;
return this;
}
@@ -455,7 +404,7 @@ public class BeanFilter<T> {
* <br>The default is {@link PropertyNamerDefault}.
* @return This object (for method chaining).
*/
- public BeanFilter<T> propertyNamer(Class<? extends PropertyNamer>
value) {
+ public BeanFilterBuilder propertyNamer(Class<? extends PropertyNamer>
value) {
this.propertyNamer = value;
return this;
}
@@ -497,7 +446,7 @@ public class BeanFilter<T> {
* <br>Values can contain comma-delimited list of property names.
* @return This object (for method chaining).
*/
- public BeanFilter<T> bpi(String...value) {
+ public BeanFilterBuilder bpi(String...value) {
this.bpi = ASet.of();
for (String v : value)
bpi.a(split(v));
@@ -541,7 +490,7 @@ public class BeanFilter<T> {
* <br>Values can contain comma-delimited list of property names.
* @return This object (for method chaining).
*/
- public BeanFilter<T> bpx(String...value) {
+ public BeanFilterBuilder bpx(String...value) {
this.bpx = ASet.of();
for (String v : value)
bpx.a(split(v));
@@ -587,7 +536,7 @@ public class BeanFilter<T> {
* <br>Values can contain comma-delimited list of property names.
* @return This object (for method chaining).
*/
- public BeanFilter<T> bpro(String...value) {
+ public BeanFilterBuilder bpro(String...value) {
this.bpro = ASet.of();
for (String v : value)
bpro.a(split(v));
@@ -633,7 +582,7 @@ public class BeanFilter<T> {
* <br>Values can contain comma-delimited list of property names.
* @return This object (for method chaining).
*/
- public BeanFilter<T> bpwo(String...value) {
+ public BeanFilterBuilder bpwo(String...value) {
this.bpwo = ASet.of();
for (String v : value)
bpwo.a(split(v));
@@ -675,7 +624,7 @@ public class BeanFilter<T> {
* The values to add to this property.
* @return This object (for method chaining).
*/
- public BeanFilter<T> dictionary(Class<?>...values) {
+ public BeanFilterBuilder dictionary(Class<?>...values) {
if (dictionary == null)
dictionary = Arrays.asList(values);
else for (Class<?> cc : values)
@@ -716,17 +665,17 @@ public class BeanFilter<T> {
* <br>The default value is {@link BeanInterceptor}.
* @return This object (for method chaining).
*/
- public BeanFilter<T> interceptor(Class<?> value) {
+ public BeanFilterBuilder interceptor(Class<?> value) {
this.interceptor = value;
return this;
}
/**
- * Creates a {@link UnmodifiableBeanFilter} with settings in this
builder class.
+ * Creates a {@link BeanFilter} with settings in this builder class.
*
- * @return A new {@link UnmodifiableBeanFilter} instance.
+ * @return A new {@link BeanFilter} instance.
*/
- public UnmodifiableBeanFilter build() {
- return new UnmodifiableBeanFilter(this);
+ public BeanFilter build() {
+ return new BeanFilter(this);
}
}
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java
index c273208..ea5d4ae 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java
@@ -50,9 +50,6 @@ import org.apache.juneau.xml.annotation.*;
* by the {@link java.beans.BeanInfo} class (i.e. ordered by
definition in the class).
* </ul>
*
- * <p>
- * <br>The order can also be overridden through the use of a {@link
UnmodifiableBeanFilter}.
- *
* <h5 class='topic'>POJO swaps</h5>
*
* If {@link PojoSwap PojoSwaps} are defined on the class types of the
properties of this bean or the bean properties
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
index a9cdd93..45d3c98 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
@@ -27,7 +27,6 @@ import java.util.*;
import org.apache.juneau.annotation.*;
import org.apache.juneau.collections.*;
import org.apache.juneau.reflect.*;
-import org.apache.juneau.transform.*;
/**
* Encapsulates all access to the properties of a bean class (like a souped-up
{@link java.beans.BeanInfo}).
@@ -35,8 +34,7 @@ import org.apache.juneau.transform.*;
* <h5 class='topic'>Description</h5>
*
* Uses introspection to find all the properties associated with this class.
If the {@link Bean @Bean} annotation
- * is present on the class, or the class has a {@link
UnmodifiableBeanFilter} registered with it in the bean context,
- * then that information is used to determine the properties on the class.
+ * is present on the class, then that information is used to determine the
properties on the class.
* Otherwise, the {@code BeanInfo} functionality in Java is used to determine
the properties on the class.
*
* <h5 class='topic'>Bean property ordering</h5>
@@ -55,9 +53,6 @@ import org.apache.juneau.transform.*;
* </ul>
* </ul>
*
- * <p>
- * The order can also be overridden through the use of an {@link
UnmodifiableBeanFilter}.
- *
* @param <T> The class type that this metadata applies to.
*/
public class BeanMeta<T> {
@@ -84,7 +79,7 @@ public class BeanMeta<T> {
protected final BeanContext ctx;
/** Optional bean filter associated with the target class. */
- protected final UnmodifiableBeanFilter beanFilter;
+ protected final BeanFilter beanFilter;
/** Type variables implemented by this bean. */
protected final Map<Class<?>,Class<?>[]> typeVarImpls;
@@ -113,7 +108,7 @@ public class BeanMeta<T> {
* @param beanFilter Optional bean filter associated with the target
class. Can be <jk>null</jk>.
* @param pNames Explicit list of property names and order of
properties. If <jk>null</jk>, determine automatically.
*/
- protected BeanMeta(final ClassMeta<T> classMeta, BeanContext ctx,
UnmodifiableBeanFilter beanFilter, String[] pNames) {
+ protected BeanMeta(final ClassMeta<T> classMeta, BeanContext ctx,
BeanFilter beanFilter, String[] pNames) {
this.classMeta = classMeta;
this.ctx = ctx;
this.c = classMeta.getInnerClass();
@@ -141,7 +136,7 @@ public class BeanMeta<T> {
private static final class Builder<T> {
ClassMeta<T> classMeta;
BeanContext ctx;
- UnmodifiableBeanFilter beanFilter;
+ BeanFilter beanFilter;
String[] pNames;
Map<String,BeanPropertyMeta> properties;
AMap<String,BeanPropertyMeta> hiddenProperties = AMap.of();
@@ -157,7 +152,7 @@ public class BeanMeta<T> {
String dictionaryName, typePropertyName;
boolean sortProperties, fluentSetters;
- Builder(ClassMeta<T> classMeta, BeanContext ctx,
UnmodifiableBeanFilter beanFilter, String[] pNames) {
+ Builder(ClassMeta<T> classMeta, BeanContext ctx, BeanFilter
beanFilter, String[] pNames) {
this.classMeta = classMeta;
this.ctx = ctx;
this.beanFilter = beanFilter;
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
index 0effc4a..5710b9a 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
@@ -1216,17 +1216,6 @@ public class BeanSession extends Session {
}
/**
- * Configuration property: Bean filters.
- *
- *
- * @return
- * Only look for bean fields with this specified minimum
visibility.
- */
- protected UnmodifiableBeanFilter[] getBeanFilters() {
- return ctx.getBeanFilters();
- }
-
- /**
* Configuration property: BeanMap.put() returns old property value.
*
* @see BeanContext#BEAN_beanMapPutReturnsOldValue
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
index 025407d..364d69f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
@@ -93,7 +93,6 @@ public final class ClassMeta<T> implements Type {
childSwapMap, // Maps
normal subclasses to PojoSwaps.
childUnswapMap; // Maps
swap subclasses to PojoSwaps.
private final PojoSwap<T,?>[] swaps; // The object
POJO swaps associated with this bean (if it has any).
- private final UnmodifiableBeanFilter beanFilter; //
The bean filter associated with this bean (if it has one).
private final BuilderSwap<T,?> builderSwap; // The builder
swap associated with this bean (if it has one).
private final BeanContext beanContext; // The bean
context that created this object.
private final ClassMeta<?>
@@ -125,9 +124,6 @@ public final class ClassMeta<T> implements Type {
* @param implClass
* For interfaces and abstract classes, this represents the "real"
class to instantiate.
* Can be <jk>null</jk>.
- * @param beanFilter
- * The {@link UnmodifiableBeanFilter} programmatically associated
with this class.
- * Can be <jk>null</jk>.
* @param pojoSwap
* The {@link PojoSwap} programmatically associated with this
class.
* Can be <jk>null</jk>.
@@ -140,7 +136,7 @@ public final class ClassMeta<T> implements Type {
* Used for delayed initialization when the possibility of class
reference loops exist.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
- ClassMeta(Class<T> innerClass, BeanContext beanContext, Class<? extends
T> implClass, UnmodifiableBeanFilter beanFilter, PojoSwap<T,?>[] swaps,
PojoSwap<?,?>[] childPojoSwaps, Object example) {
+ ClassMeta(Class<T> innerClass, BeanContext beanContext, Class<? extends
T> implClass, PojoSwap<T,?>[] swaps, PojoSwap<?,?>[] childPojoSwaps, Object
example) {
this.innerClass = innerClass;
this.info = ClassInfo.of(innerClass);
this.beanContext = beanContext;
@@ -152,7 +148,7 @@ public final class ClassMeta<T> implements Type {
if (beanContext != null && beanContext.cmCache != null
&& isCacheable(innerClass))
beanContext.cmCache.put(innerClass, this);
- ClassMetaBuilder<T> builder = new
ClassMetaBuilder(innerClass, beanContext, implClass, beanFilter, swaps,
childPojoSwaps, example);
+ ClassMetaBuilder<T> builder = new
ClassMetaBuilder(innerClass, beanContext, implClass, swaps, childPojoSwaps,
example);
this.cc = builder.cc;
this.isDelegate = builder.isDelegate;
@@ -163,7 +159,6 @@ public final class ClassMeta<T> implements Type {
this.stringConstructor = builder.stringConstructor;
this.primitiveDefault = builder.primitiveDefault;
this.publicMethods = builder.publicMethods;
- this.beanFilter = beanFilter;
this.swaps = builder.swaps.isEmpty() ? null :
builder.swaps.toArray(new PojoSwap[builder.swaps.size()]);
this.builderSwap = builder.builderSwap;
this.keyType = builder.keyType;
@@ -252,7 +247,6 @@ public final class ClassMeta<T> implements Type {
this.notABeanReason = mainType.notABeanReason;
this.swaps = mainType.swaps;
this.builderSwap = mainType.builderSwap;
- this.beanFilter = mainType.beanFilter;
this.initException = mainType.initException;
this.beanRegistry = mainType.beanRegistry;
this.exampleMethod = mainType.exampleMethod;
@@ -296,7 +290,6 @@ public final class ClassMeta<T> implements Type {
this.notABeanReason = null;
this.swaps = null;
this.builderSwap = null;
- this.beanFilter = null;
this.initException = null;
this.beanRegistry = null;
this.exampleMethod = null;
@@ -350,7 +343,7 @@ public final class ClassMeta<T> implements Type {
Object example;
Mutater<String,T> stringMutater;
- ClassMetaBuilder(Class<T> innerClass, BeanContext beanContext,
Class<? extends T> implClass, UnmodifiableBeanFilter beanFilter,
PojoSwap<T,?>[] swaps, PojoSwap<?,?>[] childPojoSwaps, Object example) {
+ ClassMetaBuilder(Class<T> innerClass, BeanContext beanContext,
Class<? extends T> implClass, PojoSwap<T,?>[] swaps, PojoSwap<?,?>[]
childPojoSwaps, Object example) {
this.innerClass = innerClass;
this.beanContext = beanContext;
BeanContext bc = beanContext;
@@ -540,8 +533,7 @@ public final class ClassMeta<T> implements Type {
noArgConstructor = x.getPublicConstructor();
}
- if (beanFilter == null)
- beanFilter = findBeanFilter(bc);
+ BeanFilter beanFilter = findBeanFilter(bc);
if (swaps != null)
this.swaps.a(swaps);
@@ -684,7 +676,7 @@ public final class ClassMeta<T> implements Type {
this.stringMutater = Mutaters.get(String.class, c);
}
- private UnmodifiableBeanFilter findBeanFilter(BeanContext bc) {
+ private BeanFilter findBeanFilter(BeanContext bc) {
try {
List<Bean> ba = info.getAnnotations(Bean.class,
bc);
if (! ba.isEmpty())
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
index 10e06d5..0a5d1ea 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
@@ -258,60 +258,6 @@ public @interface BeanConfig {
String beanFieldVisibility() default "";
/**
- * Configuration property: Bean filters.
- *
- * <p>
- * This is a programmatic equivalent to the {@link Bean @Bean}
annotation.
- * <br>It's useful when you want to use the <c>@Bean</c> annotation
functionality, but you don't have the ability to alter
- * the bean classes.
- *
- * <ul class='notes'>
- * <li>
- * Values can consist of any of the following types:
- * <ul class='spaced-list'>
- * <li>Any subclass of {@link BeanFilter}.
- * <br>These must have a public no-arg
constructor.
- * <li>Any bean interfaces.
- * <br>A shortcut for defining a {@link
BeanFilter} with {@link BeanFilter#interfaceClass(Class)}.
- * <br>Any subclasses of an interface
class will only have properties defined on the interface.
- * <br>All other bean properties will be
ignored.
- * </ul>
- * </ul>
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_beanFilters}
- * <li class='link'>{@doc BeanFilters}
- * <li class='link'>{@doc InterfaceFilters}
- * </ul>
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link #interfaces()} or other various
approaches.
- * </div>
- */
- @Deprecated
- Class<?>[] beanFilters() default {};
-
- /**
- * Configuration property: Add to bean filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link #interfaces()} or other various
approaches.
- * </div>
- */
- @Deprecated
- Class<?>[] beanFilters_replace() default {};
-
- /**
- * Configuration property: Remove from bean filters.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link #interfaces()} or other various
approaches.
- * </div>
- */
- @Deprecated
- Class<?>[] beanFilters_remove() default {};
-
- /**
* Configuration property: BeanMap.put() returns old property value.
*
* <p>
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
index e31d9e5..8491cf9 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
@@ -39,7 +39,6 @@ public class BeanConfigApply extends ConfigApply<BeanConfig> {
super(c, r);
}
- @SuppressWarnings("deprecation")
@Override
public void apply(AnnotationInfo<BeanConfig> ai, PropertyStoreBuilder
psb) {
BeanConfig a = ai.getAnnotation();
@@ -56,12 +55,6 @@ public class BeanConfigApply extends ConfigApply<BeanConfig>
{
psb.removeFrom(BEAN_beanDictionary,
a.dictionary_remove());
if (! a.beanFieldVisibility().isEmpty())
psb.set(BEAN_beanFieldVisibility,
visibility(a.beanFieldVisibility(), "beanFieldVisibility"));
- if (a.beanFilters().length != 0)
- psb.prependTo(BEAN_beanFilters, a.beanFilters());
- if (a.beanFilters_replace().length != 0)
- psb.prependTo(BEAN_beanFilters,
a.beanFilters_replace());
- if (a.beanFilters_remove().length != 0)
- psb.removeFrom(BEAN_beanFilters,
a.beanFilters_remove());
if (! a.beanMapPutReturnsOldValue().isEmpty())
psb.set(BEAN_beanMapPutReturnsOldValue,
bool(a.beanMapPutReturnsOldValue()));
if (! a.beanMethodVisibility().isEmpty())
diff --git
a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
index 1826124..0d9f322 100644
---
a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
+++
b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
@@ -69,9 +69,10 @@ import org.apache.juneau.transforms.*;
@BeanConfig(
maxDepth="5",
detectRecursions="true",
- beanFilters={
- // Interpret these as their parent classes, not subclasses
- HttpServletRequest.class, HttpSession.class,
ServletContext.class,
+ applyBean={
+
@Bean(on="HttpServletRequest",interfaceClass=HttpServletRequest.class),
+ @Bean(on="HttpSession",interfaceClass=HttpSession.class),
+ @Bean(on="ServletContext",interfaceClass=ServletContext.class)
},
swaps={
// Add a special filter for Enumerations
diff --git
a/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
b/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
index 77b6e71..c8e8cfc 100644
---
a/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
+++
b/juneau-rest/juneau-rest-server-jaxrs/src/main/java/org/apache/juneau/rest/jaxrs/JuneauProvider.java
@@ -40,19 +40,6 @@ import org.apache.juneau.transform.*;
public @interface JuneauProvider {
/**
- * Provider-level bean filters.
- *
- * <p>
- * These filters are applied to all serializers and parsers being used
by the provider.
- *
- * <p>
- * If the specified class is an instance of {@link BeanFilter}, then a
filter built from that builder is added.
- * Any other classes are wrapped in a {@link BeanFilter} with {@link
BeanFilter#interfaceClass(Class)} to indicate that subclasses should
- * be treated as the specified class type.
- */
- Class<?>[] beanFilters() default {};
-
- /**
* Provider-level properties.
*
* <p>
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
index 406411d..a9e9ba9 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
@@ -17,7 +17,6 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
-import org.apache.juneau.*;
import org.apache.juneau.annotation.*;
import org.apache.juneau.rest.*;
import org.apache.juneau.http.annotation.*;
@@ -38,47 +37,6 @@ import org.apache.juneau.http.remote.*;
public @interface RestMethod {
/**
- * Sets the bean filters for the serializers and parsers defined on
this method.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#beanFilters()}
- * </div>
- *
- * <p>
- * If no value is specified, the bean filters are inherited from the
class.
- * <br>Otherwise, this value overrides the bean filters defined on the
class.
- *
- * <p>
- * Use {@link Inherit} to inherit bean filters defined on the class.
- *
- * <p>
- * Use {@link None} to suppress inheriting bean filters defined on the
class.
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_beanFilters}
- * </ul>
- */
- @Deprecated Class<?>[] beanFilters() default {};
-
- /**
- * Shortcut for specifying the {@link BeanContext#BEAN_bpi} property on
all serializers.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#bpi()}
- * </div>
- */
- @Deprecated String[] bpi() default {};
-
- /**
- * Shortcut for specifying the {@link BeanContext#BEAN_bpx} property on
all serializers.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link BeanConfig#bpx()}
- * </div>
- */
- @Deprecated String[] bpx() default {};
-
- /**
* Specifies whether this method can be called based on the client
version.
*
* <p>
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodAnnotation.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodAnnotation.java
index ba2cea9..b9c7f8f 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodAnnotation.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodAnnotation.java
@@ -42,8 +42,6 @@ public class RestMethodAnnotation implements RestMethod {
summary = "";
private String[]
- bpi = new String[0],
- bpx = new String[0],
defaultFormData = new String[0],
defaultQuery = new String[0],
description = new String[0],
@@ -55,7 +53,6 @@ public class RestMethodAnnotation implements RestMethod {
consumes = new String[0];
private Class<?>[]
- beanFilters = new Class<?>[0],
encoders = new Class<?>[0],
parsers = new Class<?>[0],
serializers = new Class<?>[0];
@@ -80,21 +77,6 @@ public class RestMethodAnnotation implements RestMethod {
}
@Override /* RestMethod */
- public Class<?>[] beanFilters() {
- return beanFilters;
- }
-
- @Override /* RestMethod */
- public String[] bpi() {
- return bpi;
- }
-
- @Override /* RestMethod */
- public String[] bpx() {
- return bpx;
- }
-
- @Override /* RestMethod */
public String clientVersion() {
return clientVersion;
}
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java
index 96287a9..44242bc 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java
@@ -12,13 +12,11 @@
//
***************************************************************************************************************************
package org.apache.juneau.rest.annotation;
-import static org.apache.juneau.BeanContext.*;
import static org.apache.juneau.internal.ArrayUtils.*;
import static org.apache.juneau.internal.StringUtils.*;
import static org.apache.juneau.rest.RestContext.*;
import static org.apache.juneau.rest.RestMethodContext.*;
import static org.apache.juneau.rest.util.RestUtils.*;
-import java.util.*;
import java.util.logging.*;
import org.apache.juneau.*;
@@ -45,7 +43,6 @@ public class RestMethodConfigApply extends
ConfigApply<RestMethod> {
super(c, r);
}
- @SuppressWarnings("deprecation")
@Override
public void apply(AnnotationInfo<RestMethod> ai, PropertyStoreBuilder
psb) {
RestMethod a = ai.getAnnotation();
@@ -107,36 +104,6 @@ public class RestMethodConfigApply extends
ConfigApply<RestMethod> {
if (! a.clientVersion().isEmpty())
psb.set(RESTMETHOD_clientVersion, a.clientVersion());
- psb.set(BEAN_beanFilters,
merge(ConverterUtils.toType(psb.peek(BEAN_beanFilters), Object[].class),
a.beanFilters()));
-
- if (a.bpi().length > 0) {
- Map<String,String> bpiMap = new LinkedHashMap<>();
- for (String s1 : a.bpi()) {
- for (String s2 : split(s1, ';')) {
- int i = s2.indexOf(':');
- if (i == -1)
- throw new ConfigException(
- "Invalid format for
@RestMethod(bpi) on method ''{0}''. Must be in the format \"ClassName:
comma-delimited-tokens\". \nValue: {1}", sig, s1);
- bpiMap.put(s2.substring(0, i).trim(),
s2.substring(i+1).trim());
- }
- }
- psb.putAllTo(BEAN_bpi, bpiMap);
- }
-
- if (a.bpx().length > 0) {
- Map<String,String> bpxMap = new LinkedHashMap<>();
- for (String s1 : a.bpx()) {
- for (String s2 : split(s1, ';')) {
- int i = s2.indexOf(':');
- if (i == -1)
- throw new ConfigException(
- "Invalid format for
@RestMethod(bpx) on method ''{0}''. Must be in the format \"ClassName:
comma-delimited-tokens\". \nValue: {1}", sig, s1);
- bpxMap.put(s2.substring(0, i).trim(),
s2.substring(i+1).trim());
- }
- }
- psb.putAllTo(BEAN_bpx, bpxMap);
- }
-
if (! a.defaultCharset().isEmpty())
psb.set(REST_defaultCharset,
string(a.defaultCharset()));