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 2017/03/10 16:51:19 UTC
[23/34] incubator-juneau git commit: Add builder classes for all
serializers and parsers.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerBuilder.java
new file mode 100644
index 0000000..219211d
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerBuilder.java
@@ -0,0 +1,528 @@
+// ***************************************************************************************************************************
+// * 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.csv;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.serializer.*;
+
+/**
+ * Builder class for building instances of CSV serializers.
+ */
+public class CsvSerializerBuilder extends SerializerBuilder {
+
+ /**
+ * Constructor, default settings.
+ */
+ public CsvSerializerBuilder() {
+ super();
+ }
+
+ /**
+ * Constructor.
+ * @param propertyStore The initial configuration settings for this builder.
+ */
+ public CsvSerializerBuilder(PropertyStore propertyStore) {
+ super(propertyStore);
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializer build() {
+ return new CsvSerializer(propertyStore);
+ }
+
+
+ //--------------------------------------------------------------------------------
+ // Properties
+ //--------------------------------------------------------------------------------
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder maxDepth(int value) {
+ super.maxDepth(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder initialDepth(int value) {
+ super.initialDepth(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder detectRecursions(boolean value) {
+ super.detectRecursions(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder ignoreRecursions(boolean value) {
+ super.ignoreRecursions(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder useWhitespace(boolean value) {
+ super.useWhitespace(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder ws() {
+ super.ws();
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder addBeanTypeProperties(boolean value) {
+ super.addBeanTypeProperties(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder quoteChar(char value) {
+ super.quoteChar(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder sq() {
+ super.sq();
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder trimNullProperties(boolean value) {
+ super.trimNullProperties(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder trimEmptyCollections(boolean value) {
+ super.trimEmptyCollections(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder trimEmptyMaps(boolean value) {
+ super.trimEmptyMaps(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder trimStrings(boolean value) {
+ super.trimStrings(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder relativeUriBase(String value) {
+ super.relativeUriBase(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder absolutePathUriBase(String value) {
+ super.absolutePathUriBase(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder sortCollections(boolean value) {
+ super.sortCollections(value);
+ return this;
+ }
+
+ @Override /* SerializerBuilder */
+ public CsvSerializerBuilder sortMaps(boolean value) {
+ super.sortMaps(value);
+ return this;
+ }
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beansRequireDefaultConstructor(boolean value) {
+ super.beansRequireDefaultConstructor(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beansRequireSerializable(boolean value) {
+ super.beansRequireSerializable(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beansRequireSettersForGetters(boolean value) {
+ super.beansRequireSettersForGetters(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beansRequireSomeProperties(boolean value) {
+ super.beansRequireSomeProperties(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanMapPutReturnsOldValue(boolean value) {
+ super.beanMapPutReturnsOldValue(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanConstructorVisibility(Visibility value) {
+ super.beanConstructorVisibility(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanClassVisibility(Visibility value) {
+ super.beanClassVisibility(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanFieldVisibility(Visibility value) {
+ super.beanFieldVisibility(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder methodVisibility(Visibility value) {
+ super.methodVisibility(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder useJavaBeanIntrospector(boolean value) {
+ super.useJavaBeanIntrospector(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder useInterfaceProxies(boolean value) {
+ super.useInterfaceProxies(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder ignoreUnknownBeanProperties(boolean value) {
+ super.ignoreUnknownBeanProperties(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder ignoreUnknownNullBeanProperties(boolean value) {
+ super.ignoreUnknownNullBeanProperties(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder ignorePropertiesWithoutSetters(boolean value) {
+ super.ignorePropertiesWithoutSetters(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder ignoreInvocationExceptionsOnGetters(boolean value) {
+ super.ignoreInvocationExceptionsOnGetters(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder ignoreInvocationExceptionsOnSetters(boolean value) {
+ super.ignoreInvocationExceptionsOnSetters(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder sortProperties(boolean value) {
+ super.sortProperties(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder notBeanPackages(String...values) {
+ super.notBeanPackages(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder notBeanPackages(Collection<String> values) {
+ super.notBeanPackages(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setNotBeanPackages(String...values) {
+ super.setNotBeanPackages(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setNotBeanPackages(Collection<String> values) {
+ super.setNotBeanPackages(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeNotBeanPackages(String...values) {
+ super.removeNotBeanPackages(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeNotBeanPackages(Collection<String> values) {
+ super.removeNotBeanPackages(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder notBeanClasses(Class<?>...values) {
+ super.notBeanClasses(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder notBeanClasses(Collection<Class<?>> values) {
+ super.notBeanClasses(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setNotBeanClasses(Class<?>...values) {
+ super.setNotBeanClasses(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setNotBeanClasses(Collection<Class<?>> values) {
+ super.setNotBeanClasses(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeNotBeanClasses(Class<?>...values) {
+ super.removeNotBeanClasses(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeNotBeanClasses(Collection<Class<?>> values) {
+ super.removeNotBeanClasses(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanFilters(Class<?>...values) {
+ super.beanFilters(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanFilters(Collection<Class<?>> values) {
+ super.beanFilters(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setBeanFilters(Class<?>...values) {
+ super.setBeanFilters(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setBeanFilters(Collection<Class<?>> values) {
+ super.setBeanFilters(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeBeanFilters(Class<?>...values) {
+ super.removeBeanFilters(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeBeanFilters(Collection<Class<?>> values) {
+ super.removeBeanFilters(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder pojoSwaps(Class<?>...values) {
+ super.pojoSwaps(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder pojoSwaps(Collection<Class<?>> values) {
+ super.pojoSwaps(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setPojoSwaps(Class<?>...values) {
+ super.setPojoSwaps(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setPojoSwaps(Collection<Class<?>> values) {
+ super.setPojoSwaps(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removePojoSwaps(Class<?>...values) {
+ super.removePojoSwaps(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removePojoSwaps(Collection<Class<?>> values) {
+ super.removePojoSwaps(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder implClasses(Map<Class<?>,Class<?>> values) {
+ super.implClasses(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public <T> CsvSerializerBuilder implClass(Class<T> interfaceClass, Class<? extends T> implClass) {
+ super.implClass(interfaceClass, implClass);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanDictionary(Class<?>...values) {
+ super.beanDictionary(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanDictionary(Collection<Class<?>> values) {
+ super.beanDictionary(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setBeanDictionary(Class<?>...values) {
+ super.setBeanDictionary(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder setBeanDictionary(Collection<Class<?>> values) {
+ super.setBeanDictionary(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeFromBeanDictionary(Class<?>...values) {
+ super.removeFromBeanDictionary(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeFromBeanDictionary(Collection<Class<?>> values) {
+ super.removeFromBeanDictionary(values);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder beanTypePropertyName(String value) {
+ super.beanTypePropertyName(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder defaultParser(Class<?> value) {
+ super.defaultParser(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder locale(Locale value) {
+ super.locale(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder timeZone(TimeZone value) {
+ super.timeZone(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder mediaType(MediaType value) {
+ super.mediaType(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder debug(boolean value) {
+ super.debug(value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder property(String name, Object value) {
+ super.property(name, value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder properties(Map<String,Object> properties) {
+ super.properties(properties);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder addToProperty(String name, Object value) {
+ super.addToProperty(name, value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder putToProperty(String name, Object key, Object value) {
+ super.putToProperty(name, key, value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder putToProperty(String name, Object value) {
+ super.putToProperty(name, value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder removeFromProperty(String name, Object value) {
+ super.removeFromProperty(name, value);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder classLoader(ClassLoader classLoader) {
+ super.classLoader(classLoader);
+ return this;
+ }
+
+ @Override /* CoreObjectBuilder */
+ public CsvSerializerBuilder apply(PropertyStore copyFrom) {
+ super.apply(copyFrom);
+ return this;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerContext.java
new file mode 100644
index 0000000..8346570
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerContext.java
@@ -0,0 +1,53 @@
+// ***************************************************************************************************************************
+// * 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.csv;
+
+import org.apache.juneau.*;
+import org.apache.juneau.serializer.*;
+
+/**
+ * Configurable properties on the {@link CsvSerializer} class.
+ * <p>
+ * Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store
+ * passed into the constructor.
+ * <p>
+ * See {@link PropertyStore} for more information about context properties.
+ *
+ * <h5 class='section'>Inherited configurable properties:</h5>
+ * <ul class='javahierarchy'>
+ * <li class='c'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers.
+ * <ul>
+ * <li class='c'><a class="doclink" href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a> - Configurable properties common to all serializers.
+ * </ul>
+ * </ul>
+ */
+public final class CsvSerializerContext extends SerializerContext {
+
+ /**
+ * Constructor.
+ * <p>
+ * Typically only called from {@link PropertyStore#getContext(Class)}.
+ *
+ * @param ps The property store that created this context.
+ */
+ public CsvSerializerContext(PropertyStore ps) {
+ super(ps);
+ }
+
+ @Override /* Context */
+ public ObjectMap asMap() {
+ return super.asMap()
+ .append("CsvSerializerContext", new ObjectMap()
+ );
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java
new file mode 100644
index 0000000..bee169f
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializerSession.java
@@ -0,0 +1,46 @@
+// ***************************************************************************************************************************
+// * 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.csv;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.serializer.*;
+
+/**
+ * Session object that lives for the duration of a single use of {@link CsvSerializer}.
+ * <p>
+ * This class is NOT thread safe. It is meant to be discarded after one-time use.
+ */
+public final class CsvSerializerSession extends SerializerSession {
+
+ /**
+ * Create a new session using properties specified in the context.
+ *
+ * @param ctx The context creating this session object.
+ * The context contains all the configuration settings for this object.
+ * @param output The output object.
+ * @param op The override properties.
+ * These override any context properties defined in the context.
+ * @param javaMethod The java method that called this serializer, usually the method in a REST servlet.
+ * @param locale The session locale.
+ * If <jk>null</jk>, then the locale defined on the context is used.
+ * @param timeZone The session timezone.
+ * If <jk>null</jk>, then the timezone defined on the context is used.
+ * @param mediaType The session media type (e.g. <js>"application/json"</js>).
+ */
+ protected CsvSerializerSession(CsvSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType) {
+ super(ctx, op, output, javaMethod, locale, timeZone, mediaType);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Common.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Common.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Common.java
index da813ac..c97d66c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Common.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Common.java
@@ -12,13 +12,13 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.atom;
+import static org.apache.juneau.dto.atom.Utils.*;
import static org.apache.juneau.xml.annotation.XmlFormat.*;
import java.net.URI;
import org.apache.juneau.annotation.*;
import org.apache.juneau.xml.annotation.*;
-import static org.apache.juneau.dto.atom.Utils.*;
/**
* Represents an <code>atomCommonAttributes</code> construct in the RFC4287 specification.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
index 160e196..b8df85a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
@@ -12,8 +12,8 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.atom;
-import static org.apache.juneau.xml.annotation.XmlFormat.*;
import static org.apache.juneau.dto.atom.Utils.*;
+import static org.apache.juneau.xml.annotation.XmlFormat.*;
import java.util.*;
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
index 754bb08..b5b55e5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
@@ -12,12 +12,13 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.atom;
+import static org.apache.juneau.dto.atom.Utils.*;
+
import java.net.URI;
import java.util.*;
import org.apache.juneau.annotation.*;
import org.apache.juneau.transforms.*;
-import static org.apache.juneau.dto.atom.Utils.*;
/**
* Represents an <code>atomEntry</code> construct in the RFC4287 specification.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Generator.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Generator.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Generator.java
index 861ed61..8dcea3c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Generator.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Generator.java
@@ -12,13 +12,13 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.atom;
+import static org.apache.juneau.dto.atom.Utils.*;
import static org.apache.juneau.xml.annotation.XmlFormat.*;
import java.net.URI;
import org.apache.juneau.annotation.*;
import org.apache.juneau.xml.annotation.*;
-import static org.apache.juneau.dto.atom.Utils.*;
/**
* Represents an <code>atomGenerator</code> construct in the RFC4287 specification.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
index 4cfa907..bb7f00d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
@@ -12,13 +12,13 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.atom;
+import static org.apache.juneau.dto.atom.Utils.*;
import static org.apache.juneau.xml.annotation.XmlFormat.*;
import java.net.URI;
import org.apache.juneau.annotation.*;
import org.apache.juneau.xml.annotation.*;
-import static org.apache.juneau.dto.atom.Utils.*;
/**
* Represents an <code>atomIcon</code> construct in the RFC4287 specification.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Logo.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Logo.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Logo.java
index 1153455..744179b 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Logo.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Logo.java
@@ -12,13 +12,13 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.atom;
+import static org.apache.juneau.dto.atom.Utils.*;
import static org.apache.juneau.xml.annotation.XmlFormat.*;
import java.net.URI;
import org.apache.juneau.annotation.*;
import org.apache.juneau.xml.annotation.*;
-import static org.apache.juneau.dto.atom.Utils.*;
/**
* Represents an <code>atomLogo</code> construct in the RFC4287 specification.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Person.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Person.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Person.java
index 544ee63..02ea54a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Person.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Person.java
@@ -12,10 +12,11 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.atom;
+import static org.apache.juneau.dto.atom.Utils.*;
+
import java.net.URI;
import org.apache.juneau.annotation.*;
-import static org.apache.juneau.dto.atom.Utils.*;
/**
* Represents an <code>atomPersonConstruct</code> construct in the RFC4287 specification.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html b/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
index 88caad0..ac7c3bd 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
@@ -133,7 +133,7 @@
<h6 class='figure'>Example with no namespaces</h6>
<p class='bcode'>
<jc>// Create a serializer with readable output, no namespaces yet.</jc>
- XmlSerializer s = <jk>new</jk> XmlSerializer.SqReadable();
+ XmlSerializer s = <jk>new</jk> XmlSerializerBuilder().sq().ws().build();
<jc>// Serialize to ATOM/XML</jc>
String atomXml = s.serialize(feed);
@@ -193,7 +193,7 @@
<h6 class='figure'>Example with namespaces</h6>
<p class='bcode'>
<jc>// Create a serializer with readable output with namespaces.</jc>
- XmlSerializer s = <jk>new</jk> XmlSerializer.SqReadable();
+ XmlSerializer s = <jk>new</jk> XmlSerializerBuilder().sq().ws().build();
<jc>// Serialize to ATOM/XML</jc>
String atomXml = s.serialize(feed);
@@ -257,7 +257,7 @@
<h6 class='figure'>Example with namespaces with ATOM as the default namespace</h6>
<p class='bcode'>
<jc>// Create a serializer with readable output with namespaces.</jc>
- XmlSerializer s = <jk>new</jk> XmlSerializer.SqReadable().setDefaultNamespaceUri(<js>"atom"</js>);
+ XmlSerializer s = <jk>new</jk> XmlSerializerBuilder().sq().ws().defaultNamespaceUri(<js>"atom"</js>).build();
<jc>// Serialize to ATOM/XML</jc>
String atomXml = s.serialize(feed);
@@ -426,10 +426,12 @@
<h6 class='figure'>ATOM/RDF/XML example</h6>
<p class='bcode'>
<jc>// Get RDF/XML serializer with readable output.</jc>
- RdfSerializer s = <jk>new</jk> RdfSerializer.XmlAbbrev()
- .setUseIndentation(<jk>true</jk>)
- .setQuoteChar(<js>'\''</js>)
- .setProperty(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3);
+ RdfSerializer s = <jk>new</jk> RdfSerializerBuilder()
+ .xmlabbrev()
+ .ws()
+ .sq()
+ .property(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3)
+ .build();
<jc>// Serialize to ATOM/RDF/XML</jc>
String atomRdfXml = s.serialize(feed);
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java
index 03ff3d3..82e6ef2 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java
@@ -12,9 +12,10 @@
// ***************************************************************************************************************************
package org.apache.juneau.dto.html5;
-import org.apache.juneau.xml.annotation.*;
import static org.apache.juneau.xml.annotation.XmlFormat.*;
+import org.apache.juneau.xml.annotation.*;
+
/**
* A subclass of HTML elements that have no content or end tags.
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
index 4bf4e03..ce948c6 100644
--- a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
+++ b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java
@@ -12,14 +12,10 @@
// ***************************************************************************************************************************
package org.apache.juneau.encoders;
-import static org.apache.juneau.internal.ArrayUtils.*;
-
import java.util.*;
import java.util.concurrent.*;
import org.apache.juneau.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.serializer.*;
/**
* Represents the group of {@link Encoder encoders} keyed by codings.
@@ -39,13 +35,13 @@ import org.apache.juneau.serializer.*;
* Adding new entries will cause the entries to be prepended to the group.
* This allows for previous encoders to be overridden through subsequent calls.
* <p>
- * For example, calling <code>g.append(E1.<jk>class</jk>,E2.<jk>class</jk>).append(E3.<jk>class</jk>,E4.<jk>class</jk>)</code>
+ * For example, calling <code>groupBuilder.append(E1.<jk>class</jk>,E2.<jk>class</jk>).append(E3.<jk>class</jk>,E4.<jk>class</jk>)</code>
* will result in the order <code>E3, E4, E1, E2</code>.
*
* <h5 class='section'>Example:</h5>
* <p class='bcode'>
* <jc>// Create an encoder group with support for gzip compression.</jc>
- * EncoderGroup g = <jk>new</jk> EncoderGroup().append(GzipEncoder.<jk>class</jk>);
+ * EncoderGroup g = <jk>new</jk> EncoderGroupBuilder().append(GzipEncoder.<jk>class</jk>).build();
*
* <jc>// Should return "gzip"</jc>
* String matchedCoding = g.findMatch(<js>"compress;q=1.0, gzip;q=0.8, identity;q=0.5, *;q=0"</js>);
@@ -54,69 +50,22 @@ import org.apache.juneau.serializer.*;
* IEncoder encoder = g.getEncoder(matchedCoding);
* </p>
*/
-public final class EncoderGroup extends Lockable {
+public final class EncoderGroup {
// Maps Accept-Encoding headers to matching encoders.
private final Map<String,EncoderMatch> cache = new ConcurrentHashMap<String,EncoderMatch>();
- private final CopyOnWriteArrayList<Encoder> encoders = new CopyOnWriteArrayList<Encoder>();
+ final Encoder[] encoders;
/**
- * Adds the specified encoder to the beginning of this group.
+ * Constructor
*
- * @param e The encoder to add to this group.
- * @return This object (for method chaining).
+ * @param encoders The encoders to add to this group.
*/
- public EncoderGroup append(Encoder e) {
- checkLock();
- synchronized(this) {
- cache.clear();
- encoders.add(0, e);
- }
- return this;
+ public EncoderGroup(Encoder[] encoders) {
+ this.encoders = Arrays.copyOf(encoders, encoders.length);
}
- /**
- * Registers the specified encoders with this group.
- *
- * @param e The encoders to append to this group.
- * @return This object (for method chaining).
- * @throws Exception Thrown if {@link Encoder} could not be constructed.
- */
- public EncoderGroup append(Class<? extends Encoder>...e) throws Exception {
- for (Class<? extends Encoder> ee : ArrayUtils.reverse(e))
- append(ee);
- return this;
- }
-
- /**
- * Same as {@link #append(Class[])}, except specify a single class to avoid unchecked compile warnings.
- *
- * @param e The encoder to append to this group.
- * @return This object (for method chaining).
- * @throws Exception Thrown if {@link Serializer} could not be constructed.
- */
- public EncoderGroup append(Class<? extends Encoder> e) throws Exception {
- try {
- append(e.newInstance());
- } catch (NoClassDefFoundError x) {
- // Ignore if dependent library not found (e.g. Jena).
- System.err.println(e); // NOT DEBUG
- }
- return this;
- }
-
- /**
- * Adds the encoders in the specified group to this group.
- *
- * @param g The group containing the encoders to add to this group.
- * @return This object (for method chaining).
- */
- public EncoderGroup append(EncoderGroup g) {
- for (Encoder e : reverse(g.encoders.toArray(new Encoder[g.encoders.size()])))
- append(e);
- return this;
- }
/**
* Returns the coding string for the matching encoder that can handle the specified <code>Accept-Encoding</code>
@@ -130,7 +79,7 @@ public final class EncoderGroup extends Lockable {
* @return The coding value (e.g. <js>"gzip"</js>).
*/
public EncoderMatch getEncoderMatch(String acceptEncoding) {
- if (encoders.size() == 0)
+ if (encoders.length == 0)
return null;
EncoderMatch em = cache.get(acceptEncoding);
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java
new file mode 100644
index 0000000..7a965c6
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroupBuilder.java
@@ -0,0 +1,109 @@
+// ***************************************************************************************************************************
+// * 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.encoders;
+
+import java.util.*;
+
+/**
+ * Builder class for creating instances of {@link EncoderGroup}.
+ */
+public class EncoderGroupBuilder {
+
+ private final List<Encoder> encoders;
+
+ /**
+ * Create an empty encoder group builder.
+ */
+ public EncoderGroupBuilder() {
+ this.encoders = new ArrayList<Encoder>();
+ }
+
+ /**
+ * Clone an existing encoder group builder.
+ * @param copyFrom The encoder group that we're copying settings and encoders from.
+ */
+ public EncoderGroupBuilder(EncoderGroup copyFrom) {
+ this.encoders = new ArrayList<Encoder>(Arrays.asList(copyFrom.encoders));
+ }
+
+ /**
+ * Registers the specified encoders with this group.
+ *
+ * @param e The encoders to append to this group.
+ * @return This object (for method chaining).
+ */
+ public EncoderGroupBuilder append(Class<?>...e) {
+ for (Class<?> ee : e) {
+ try {
+ encoders.add((Encoder)((Class<?>)ee).newInstance());
+ } catch (Exception x) {
+ throw new RuntimeException(x);
+ }
+ }
+ return this;
+ }
+
+ /**
+ * Registers the specified encoders with this group.
+ *
+ * @param e The encoders to append to this group.
+ * @return This object (for method chaining).
+ */
+ public EncoderGroupBuilder append(Encoder...e) {
+ encoders.addAll(Arrays.asList(e));
+ return this;
+ }
+
+ /**
+ * Registers the specified encoders with this group.
+ *
+ * @param e The encoders to append to this group.
+ * @return This object (for method chaining).
+ */
+ public EncoderGroupBuilder append(Collection<Encoder> e) {
+ encoders.addAll(e);
+ return this;
+ }
+
+ /**
+ * Registers the encoders in the specified group with this group.
+ *
+ * @param eg The encoders to append to this group.
+ * @return This object (for method chaining).
+ */
+ public EncoderGroupBuilder append(EncoderGroup eg) {
+ append(eg.encoders);
+ return this;
+ }
+
+ /**
+ * Creates a new {@link EncoderGroup} object using a snapshot of the settings defined in this builder.
+ * <p>
+ * This method can be called multiple times to produce multiple encoder groups.
+ *
+ * @return A new {@link EncoderGroup} object.
+ */
+ @SuppressWarnings("unchecked")
+ public EncoderGroup build() {
+ try {
+ List<Encoder> l = new ArrayList<Encoder>();
+ for (Object e : encoders) {
+ l.add(e instanceof Class ? ((Class<? extends Encoder>)e).getConstructor().newInstance() : (Encoder)e);
+ }
+ Collections.reverse(l);
+ return new EncoderGroup(l.toArray(new Encoder[l.size()]));
+ } catch (Exception x) {
+ throw new RuntimeException("Could not instantiate encoder.", x);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
index 6428d8a..7359699 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
@@ -54,7 +54,19 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
/** Default serializer, all default settings. */
- public static final HtmlDocSerializer DEFAULT = new HtmlDocSerializer().lock();
+ public static final HtmlDocSerializer DEFAULT = new HtmlDocSerializer(PropertyStore.create());
+
+
+ final HtmlDocSerializerContext ctx;
+
+ /**
+ * Constructor.
+ * @param propertyStore The property store containing all the settings for this object.
+ */
+ public HtmlDocSerializer(PropertyStore propertyStore) {
+ super(propertyStore);
+ this.ctx = createContext(HtmlDocSerializerContext.class);
+ }
//--------------------------------------------------------------------------------
@@ -63,7 +75,7 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
@Override /* Serializer */
public HtmlDocSerializerSession createSession(Object output, ObjectMap op, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType) {
- return new HtmlDocSerializerSession(getContext(HtmlDocSerializerContext.class), op, output, javaMethod, locale, timeZone, mediaType);
+ return new HtmlDocSerializerSession(ctx, op, output, javaMethod, locale, timeZone, mediaType);
}
@Override /* Serializer */
@@ -164,516 +176,4 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
return true;
return false;
}
-
-
- //--------------------------------------------------------------------------------
- // Properties
- //--------------------------------------------------------------------------------
-
- @Override /* HtmlSerializer */
- public HtmlDocSerializer setUriAnchorText(String value) throws LockedException {
- super.setUriAnchorText(value);
- return this;
- }
-
- @Override /* HtmlSerializer */
- public HtmlDocSerializer setDetectLinksInStrings(boolean value) throws LockedException {
- super.setDetectLinksInStrings(value);
- return this;
- }
-
- @Override /* HtmlSerializer */
- public HtmlDocSerializer setLookForLabelParameters(boolean value) throws LockedException {
- super.setLookForLabelParameters(value);
- return this;
- }
-
- @Override /* HtmlSerializer */
- public HtmlDocSerializer setLabelParameter(String value) throws LockedException {
- super.setLabelParameter(value);
- return this;
- }
-
- @Override /* HtmlSerializer */
- public HtmlDocSerializer setAddKeyValueTableHeaders(boolean value) throws LockedException {
- super.setAddKeyValueTableHeaders(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setMaxDepth(int value) throws LockedException {
- super.setMaxDepth(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setInitialDepth(int value) throws LockedException {
- super.setInitialDepth(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setDetectRecursions(boolean value) throws LockedException {
- super.setDetectRecursions(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setIgnoreRecursions(boolean value) throws LockedException {
- super.setIgnoreRecursions(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setUseWhitespace(boolean value) throws LockedException {
- super.setUseWhitespace(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setAddBeanTypeProperties(boolean value) throws LockedException {
- super.setAddBeanTypeProperties(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setQuoteChar(char value) throws LockedException {
- super.setQuoteChar(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setTrimNullProperties(boolean value) throws LockedException {
- super.setTrimNullProperties(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setTrimEmptyCollections(boolean value) throws LockedException {
- super.setTrimEmptyCollections(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setTrimEmptyMaps(boolean value) throws LockedException {
- super.setTrimEmptyMaps(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setTrimStrings(boolean value) throws LockedException {
- super.setTrimStrings(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setRelativeUriBase(String value) throws LockedException {
- super.setRelativeUriBase(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setAbsolutePathUriBase(String value) throws LockedException {
- super.setAbsolutePathUriBase(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setSortCollections(boolean value) throws LockedException {
- super.setSortCollections(value);
- return this;
- }
-
- @Override /* Serializer */
- public HtmlDocSerializer setSortMaps(boolean value) throws LockedException {
- super.setSortMaps(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeansRequireDefaultConstructor(boolean value) throws LockedException {
- super.setBeansRequireDefaultConstructor(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeansRequireSerializable(boolean value) throws LockedException {
- super.setBeansRequireSerializable(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeansRequireSettersForGetters(boolean value) throws LockedException {
- super.setBeansRequireSettersForGetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeansRequireSomeProperties(boolean value) throws LockedException {
- super.setBeansRequireSomeProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanMapPutReturnsOldValue(boolean value) throws LockedException {
- super.setBeanMapPutReturnsOldValue(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanConstructorVisibility(Visibility value) throws LockedException {
- super.setBeanConstructorVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanClassVisibility(Visibility value) throws LockedException {
- super.setBeanClassVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanFieldVisibility(Visibility value) throws LockedException {
- super.setBeanFieldVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setMethodVisibility(Visibility value) throws LockedException {
- super.setMethodVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setUseJavaBeanIntrospector(boolean value) throws LockedException {
- super.setUseJavaBeanIntrospector(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setUseInterfaceProxies(boolean value) throws LockedException {
- super.setUseInterfaceProxies(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setIgnoreUnknownBeanProperties(boolean value) throws LockedException {
- super.setIgnoreUnknownBeanProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setIgnoreUnknownNullBeanProperties(boolean value) throws LockedException {
- super.setIgnoreUnknownNullBeanProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setIgnorePropertiesWithoutSetters(boolean value) throws LockedException {
- super.setIgnorePropertiesWithoutSetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setIgnoreInvocationExceptionsOnGetters(boolean value) throws LockedException {
- super.setIgnoreInvocationExceptionsOnGetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setIgnoreInvocationExceptionsOnSetters(boolean value) throws LockedException {
- super.setIgnoreInvocationExceptionsOnSetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setSortProperties(boolean value) throws LockedException {
- super.setSortProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setNotBeanPackages(String...values) throws LockedException {
- super.setNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setNotBeanPackages(Collection<String> values) throws LockedException {
- super.setNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addNotBeanPackages(String...values) throws LockedException {
- super.addNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addNotBeanPackages(Collection<String> values) throws LockedException {
- super.addNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeNotBeanPackages(String...values) throws LockedException {
- super.removeNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeNotBeanPackages(Collection<String> values) throws LockedException {
- super.removeNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setNotBeanClasses(Class<?>...values) throws LockedException {
- super.setNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setNotBeanClasses(Collection<Class<?>> values) throws LockedException {
- super.setNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addNotBeanClasses(Class<?>...values) throws LockedException {
- super.addNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addNotBeanClasses(Collection<Class<?>> values) throws LockedException {
- super.addNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeNotBeanClasses(Class<?>...values) throws LockedException {
- super.removeNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeNotBeanClasses(Collection<Class<?>> values) throws LockedException {
- super.removeNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanFilters(Class<?>...values) throws LockedException {
- super.setBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanFilters(Collection<Class<?>> values) throws LockedException {
- super.setBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addBeanFilters(Class<?>...values) throws LockedException {
- super.addBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addBeanFilters(Collection<Class<?>> values) throws LockedException {
- super.addBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeBeanFilters(Class<?>...values) throws LockedException {
- super.removeBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeBeanFilters(Collection<Class<?>> values) throws LockedException {
- super.removeBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setPojoSwaps(Class<?>...values) throws LockedException {
- super.setPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setPojoSwaps(Collection<Class<?>> values) throws LockedException {
- super.setPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addPojoSwaps(Class<?>...values) throws LockedException {
- super.addPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addPojoSwaps(Collection<Class<?>> values) throws LockedException {
- super.addPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removePojoSwaps(Class<?>...values) throws LockedException {
- super.removePojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removePojoSwaps(Collection<Class<?>> values) throws LockedException {
- super.removePojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setImplClasses(Map<Class<?>,Class<?>> values) throws LockedException {
- super.setImplClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public <T> CoreApi addImplClass(Class<T> interfaceClass, Class<? extends T> implClass) throws LockedException {
- super.addImplClass(interfaceClass, implClass);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanDictionary(Class<?>...values) throws LockedException {
- super.setBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanDictionary(Collection<Class<?>> values) throws LockedException {
- super.setBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addToBeanDictionary(Class<?>...values) throws LockedException {
- super.addToBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addToBeanDictionary(Collection<Class<?>> values) throws LockedException {
- super.addToBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeFromBeanDictionary(Class<?>...values) throws LockedException {
- super.removeFromBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeFromBeanDictionary(Collection<Class<?>> values) throws LockedException {
- super.removeFromBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setBeanTypePropertyName(String value) throws LockedException {
- super.setBeanTypePropertyName(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setDefaultParser(Class<?> value) throws LockedException {
- super.setDefaultParser(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setLocale(Locale value) throws LockedException {
- super.setLocale(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setTimeZone(TimeZone value) throws LockedException {
- super.setTimeZone(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setMediaType(MediaType value) throws LockedException {
- super.setMediaType(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setDebug(boolean value) throws LockedException {
- super.setDebug(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setProperty(String name, Object value) throws LockedException {
- super.setProperty(name, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer setProperties(ObjectMap properties) throws LockedException {
- super.setProperties(properties);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer addToProperty(String name, Object value) throws LockedException {
- super.addToProperty(name, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer putToProperty(String name, Object key, Object value) throws LockedException {
- super.putToProperty(name, key, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer putToProperty(String name, Object value) throws LockedException {
- super.putToProperty(name, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlDocSerializer removeFromProperty(String name, Object value) throws LockedException {
- super.removeFromProperty(name, value);
- return this;
- }
-
- // Overridden methods
- //--------------------------------------------------------------------------------
-
- @Override /* CoreApi */
- public HtmlDocSerializer setClassLoader(ClassLoader classLoader) throws LockedException {
- super.setClassLoader(classLoader);
- return this;
- }
-
- @Override /* Lockable */
- public HtmlDocSerializer lock() {
- super.lock();
- return this;
- }
-
- @Override /* Lockable */
- public HtmlDocSerializer clone() {
- HtmlDocSerializer c = (HtmlDocSerializer)super.clone();
- return c;
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
index 56f6fb6..1849755 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java
@@ -231,18 +231,18 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext {
/**
* Constructor.
* <p>
- * Typically only called from {@link ContextFactory#getContext(Class)}.
+ * Typically only called from {@link PropertyStore#getContext(Class)}.
*
- * @param cf The factory that created this context.
+ * @param ps The property store that created this context.
*/
- public HtmlDocSerializerContext(ContextFactory cf) {
- super(cf);
- cssImports = cf.getProperty(HTMLDOC_cssImports, String[].class, new String[0]);
- title = cf.getProperty(HTMLDOC_title, String.class, null);
- description = cf.getProperty(HTMLDOC_description, String.class, null);
- cssUrl = cf.getProperty(HTMLDOC_cssUrl, String.class, null);
- nowrap = cf.getProperty(HTMLDOC_nowrap, boolean.class, false);
- links = cf.getMap(HTMLDOC_links, String.class, String.class, Collections.<String,String>emptyMap());
+ public HtmlDocSerializerContext(PropertyStore ps) {
+ super(ps);
+ cssImports = ps.getProperty(HTMLDOC_cssImports, String[].class, new String[0]);
+ title = ps.getProperty(HTMLDOC_title, String.class, null);
+ description = ps.getProperty(HTMLDOC_description, String.class, null);
+ cssUrl = ps.getProperty(HTMLDOC_cssUrl, String.class, null);
+ nowrap = ps.getProperty(HTMLDOC_nowrap, boolean.class, false);
+ links = ps.getMap(HTMLDOC_links, String.class, String.class, Collections.<String,String>emptyMap());
}
@Override /* Context */
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
index b4745cd..94666f8 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
@@ -44,7 +44,7 @@ public final class HtmlDocSerializerSession extends HtmlSerializerSession {
* @param output The output object. See {@link JsonSerializerSession#getWriter()} for valid class types.
* @param op The override properties.
* These override any context properties defined in the context.
- * @param javaMethod The java method that called this parser, usually the method in a REST servlet.
+ * @param javaMethod The java method that called this serializer, usually the method in a REST servlet.
* @param locale The session locale.
* If <jk>null</jk>, then the locale defined on the context is used.
* @param timeZone The session timezone.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/95e832e1/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
index 92eb48f..bce548c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
@@ -20,7 +20,6 @@ import java.lang.reflect.*;
import java.util.*;
import javax.xml.stream.*;
-import javax.xml.stream.util.*;
import org.apache.juneau.*;
import org.apache.juneau.annotation.*;
@@ -51,10 +50,27 @@ import org.apache.juneau.xml.*;
*/
@SuppressWarnings({ "rawtypes", "unchecked", "hiding" })
@Consumes("text/html,text/html+stripped")
-public final class HtmlParser extends XmlParser {
+public class HtmlParser extends XmlParser {
/** Default parser, all default settings.*/
- public static final HtmlParser DEFAULT = new HtmlParser().lock();
+ public static final HtmlParser DEFAULT = new HtmlParser(PropertyStore.create());
+
+
+ private final HtmlParserContext ctx;
+
+ /**
+ * Constructor.
+ * @param propertyStore The property store containing all the settings for this object.
+ */
+ public HtmlParser(PropertyStore propertyStore) {
+ super(propertyStore);
+ this.ctx = createContext(HtmlParserContext.class);
+ }
+
+ @Override /* CoreObject */
+ public HtmlParserBuilder builder() {
+ return new HtmlParserBuilder(propertyStore);
+ }
/*
* Reads anything starting at the current event.
@@ -350,7 +366,7 @@ public final class HtmlParser extends XmlParser {
String type = getAttribute(r, session.getBeanTypePropertyName(), null);
ClassMeta elementType2 = session.getClassMeta(type, pMeta, null);
- if (elementType2 != null)
+ if (elementType2 != null)
elementType = elementType2;
if (elementType.canCreateNewBean(l)) {
@@ -523,7 +539,7 @@ public final class HtmlParser extends XmlParser {
@Override /* Parser */
public HtmlParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) {
- return new HtmlParserSession(getContext(HtmlParserContext.class), op, input, javaMethod, outer, locale, timeZone, mediaType);
+ return new HtmlParserSession(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType);
}
@Override /* Parser */
@@ -549,445 +565,4 @@ public final class HtmlParser extends XmlParser {
HtmlParserSession s = (HtmlParserSession)session;
return parseArgs(s, s.getXmlStreamReader(), argTypes);
}
-
-
- //--------------------------------------------------------------------------------
- // Properties
- //--------------------------------------------------------------------------------
-
- @Override /* XmlParser */
- public HtmlParser setValidating(boolean value) throws LockedException {
- super.setValidating(value);
- return this;
- }
-
- @Override /* XmlParser */
- public HtmlParser setReporter(XMLReporter value) throws LockedException {
- super.setReporter(value);
- return this;
- }
-
- @Override /* XmlParser */
- public HtmlParser setResolver(XMLResolver value) throws LockedException {
- super.setResolver(value);
- return this;
- }
-
- @Override /* XmlParser */
- public HtmlParser setEventAllocator(XMLEventAllocator value) throws LockedException {
- super.setEventAllocator(value);
- return this;
- }
-
- @Override /* Parser */
- public HtmlParser setTrimStrings(boolean value) throws LockedException {
- super.setTrimStrings(value);
- return this;
- }
-
- @Override /* Parser */
- public HtmlParser setStrict(boolean value) throws LockedException {
- super.setStrict(value);
- return this;
- }
-
- @Override /* Parser */
- public HtmlParser setInputStreamCharset(String value) throws LockedException {
- super.setInputStreamCharset(value);
- return this;
- }
-
- @Override /* Parser */
- public HtmlParser setFileCharset(String value) throws LockedException {
- super.setFileCharset(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeansRequireDefaultConstructor(boolean value) throws LockedException {
- super.setBeansRequireDefaultConstructor(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeansRequireSerializable(boolean value) throws LockedException {
- super.setBeansRequireSerializable(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeansRequireSettersForGetters(boolean value) throws LockedException {
- super.setBeansRequireSettersForGetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeansRequireSomeProperties(boolean value) throws LockedException {
- super.setBeansRequireSomeProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanMapPutReturnsOldValue(boolean value) throws LockedException {
- super.setBeanMapPutReturnsOldValue(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanConstructorVisibility(Visibility value) throws LockedException {
- super.setBeanConstructorVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanClassVisibility(Visibility value) throws LockedException {
- super.setBeanClassVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanFieldVisibility(Visibility value) throws LockedException {
- super.setBeanFieldVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setMethodVisibility(Visibility value) throws LockedException {
- super.setMethodVisibility(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setUseJavaBeanIntrospector(boolean value) throws LockedException {
- super.setUseJavaBeanIntrospector(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setUseInterfaceProxies(boolean value) throws LockedException {
- super.setUseInterfaceProxies(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setIgnoreUnknownBeanProperties(boolean value) throws LockedException {
- super.setIgnoreUnknownBeanProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setIgnoreUnknownNullBeanProperties(boolean value) throws LockedException {
- super.setIgnoreUnknownNullBeanProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setIgnorePropertiesWithoutSetters(boolean value) throws LockedException {
- super.setIgnorePropertiesWithoutSetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setIgnoreInvocationExceptionsOnGetters(boolean value) throws LockedException {
- super.setIgnoreInvocationExceptionsOnGetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setIgnoreInvocationExceptionsOnSetters(boolean value) throws LockedException {
- super.setIgnoreInvocationExceptionsOnSetters(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setSortProperties(boolean value) throws LockedException {
- super.setSortProperties(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setNotBeanPackages(String...values) throws LockedException {
- super.setNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setNotBeanPackages(Collection<String> values) throws LockedException {
- super.setNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addNotBeanPackages(String...values) throws LockedException {
- super.addNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addNotBeanPackages(Collection<String> values) throws LockedException {
- super.addNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeNotBeanPackages(String...values) throws LockedException {
- super.removeNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeNotBeanPackages(Collection<String> values) throws LockedException {
- super.removeNotBeanPackages(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setNotBeanClasses(Class<?>...values) throws LockedException {
- super.setNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setNotBeanClasses(Collection<Class<?>> values) throws LockedException {
- super.setNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addNotBeanClasses(Class<?>...values) throws LockedException {
- super.addNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addNotBeanClasses(Collection<Class<?>> values) throws LockedException {
- super.addNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeNotBeanClasses(Class<?>...values) throws LockedException {
- super.removeNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeNotBeanClasses(Collection<Class<?>> values) throws LockedException {
- super.removeNotBeanClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanFilters(Class<?>...values) throws LockedException {
- super.setBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanFilters(Collection<Class<?>> values) throws LockedException {
- super.setBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addBeanFilters(Class<?>...values) throws LockedException {
- super.addBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addBeanFilters(Collection<Class<?>> values) throws LockedException {
- super.addBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeBeanFilters(Class<?>...values) throws LockedException {
- super.removeBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeBeanFilters(Collection<Class<?>> values) throws LockedException {
- super.removeBeanFilters(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setPojoSwaps(Class<?>...values) throws LockedException {
- super.setPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setPojoSwaps(Collection<Class<?>> values) throws LockedException {
- super.setPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addPojoSwaps(Class<?>...values) throws LockedException {
- super.addPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addPojoSwaps(Collection<Class<?>> values) throws LockedException {
- super.addPojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removePojoSwaps(Class<?>...values) throws LockedException {
- super.removePojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removePojoSwaps(Collection<Class<?>> values) throws LockedException {
- super.removePojoSwaps(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setImplClasses(Map<Class<?>,Class<?>> values) throws LockedException {
- super.setImplClasses(values);
- return this;
- }
-
- @Override /* CoreApi */
- public <T> CoreApi addImplClass(Class<T> interfaceClass, Class<? extends T> implClass) throws LockedException {
- super.addImplClass(interfaceClass, implClass);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanDictionary(Class<?>...values) throws LockedException {
- super.setBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanDictionary(Collection<Class<?>> values) throws LockedException {
- super.setBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addToBeanDictionary(Class<?>...values) throws LockedException {
- super.addToBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addToBeanDictionary(Collection<Class<?>> values) throws LockedException {
- super.addToBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeFromBeanDictionary(Class<?>...values) throws LockedException {
- super.removeFromBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeFromBeanDictionary(Collection<Class<?>> values) throws LockedException {
- super.removeFromBeanDictionary(values);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setBeanTypePropertyName(String value) throws LockedException {
- super.setBeanTypePropertyName(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setDefaultParser(Class<?> value) throws LockedException {
- super.setDefaultParser(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setLocale(Locale value) throws LockedException {
- super.setLocale(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setTimeZone(TimeZone value) throws LockedException {
- super.setTimeZone(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setMediaType(MediaType value) throws LockedException {
- super.setMediaType(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setDebug(boolean value) throws LockedException {
- super.setDebug(value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setProperty(String name, Object value) throws LockedException {
- super.setProperty(name, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser setProperties(ObjectMap properties) throws LockedException {
- super.setProperties(properties);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser addToProperty(String name, Object value) throws LockedException {
- super.addToProperty(name, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser putToProperty(String name, Object key, Object value) throws LockedException {
- super.putToProperty(name, key, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser putToProperty(String name, Object value) throws LockedException {
- super.putToProperty(name, value);
- return this;
- }
-
- @Override /* CoreApi */
- public HtmlParser removeFromProperty(String name, Object value) throws LockedException {
- super.removeFromProperty(name, value);
- return this;
- }
-
-
- //--------------------------------------------------------------------------------
- // Overridden methods
- //--------------------------------------------------------------------------------
-
- @Override /* CoreApi */
- public HtmlParser setClassLoader(ClassLoader classLoader) throws LockedException {
- super.setClassLoader(classLoader);
- return this;
- }
-
- @Override /* Lockable */
- public HtmlParser lock() {
- super.lock();
- return this;
- }
-
- @Override /* Lockable */
- public HtmlParser clone() {
- return (HtmlParser)super.clone();
- }
}