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 2019/11/23 22:29:26 UTC
[juneau] branch master updated: New @Beanc annotation
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 a8c9576 New @Beanc annotation
a8c9576 is described below
commit a8c95765c5ccc04e26aae3238ddbb5206bb42f85
Author: JamesBognar <ja...@apache.org>
AuthorDate: Sat Nov 23 17:29:10 2019 -0500
New @Beanc annotation
---
.../java/org/apache/juneau/BeanConfigTest.java | 2 +-
.../a/rttests/RoundTripReadOnlyBeansTest.java | 4 +-
.../src/main/java/org/apache/juneau/BeanMap.java | 4 +-
.../src/main/java/org/apache/juneau/BeanMeta.java | 23 ++++++-
.../main/java/org/apache/juneau/UriContext.java | 2 +-
.../apache/juneau/annotation/BeanConstructor.java | 3 +
.../{BeanConstructor.java => Beanc.java} | 8 +--
juneau-doc/docs/ReleaseNotes/5.0.0.02.html | 2 +-
juneau-doc/docs/ReleaseNotes/5.0.0.03.html | 2 +-
juneau-doc/docs/ReleaseNotes/8.1.2.html | 2 +
.../Topics/02.juneau-marshall/11.Transforms.html | 8 +--
.../11.BeanConstructorAnnotation.html | 12 ++--
.../11.Transforms/15.PojoBuilders.html | 2 +-
.../02.juneau-marshall/18.JacksonComparison.html | 2 +-
juneau-doc/src/main/javadoc/resources/docs.txt | 2 +-
.../main/javadoc/resources/fragments/about.html | 73 ----------------------
.../examples/core/html/HtmlComplexExample.java | 2 +-
.../examples/core/html/HtmlSimpleExample.java | 2 +-
.../examples/core/json/JsonComplexExample.java | 2 +-
.../examples/core/json/JsonSimpleExample.java | 2 +-
.../juneau/examples/core/oapi/OapiExample.java | 2 +-
.../org/apache/juneau/examples/core/pojo/Pojo.java | 2 +-
.../juneau/examples/core/pojo/PojoComplex.java | 2 +-
.../juneau/examples/core/uon/UONExample.java | 2 +-
.../examples/core/xml/XmlComplexExample.java | 2 +-
.../juneau/examples/core/xml/XmlSimpleExample.java | 2 +-
26 files changed, 61 insertions(+), 110 deletions(-)
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 be02bdc..556a68e 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
@@ -411,7 +411,7 @@ public class BeanConfigTest {
private final String name;
private final int age;
- @BeanConstructor(properties="name,age")
+ @Beanc(properties="name,age")
public ReadOnlyPerson(String name, int age) {
this.name = name;
this.age = age;
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripReadOnlyBeansTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripReadOnlyBeansTest.java
index f4cda46..3344e74 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripReadOnlyBeansTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripReadOnlyBeansTest.java
@@ -48,7 +48,7 @@ public class RoundTripReadOnlyBeansTest extends RoundTripTest {
private B f1;
private final B f2;
- @BeanConstructor(properties="f2")
+ @Beanc(properties="f2")
public A(B f2) {
this.f2 = f2;
}
@@ -75,7 +75,7 @@ public class RoundTripReadOnlyBeansTest extends RoundTripTest {
private int f1;
private final String f2;
- @BeanConstructor(properties="f2")
+ @Beanc(properties="f2")
public B(String sField) {
this.f2 = sField;
}
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 c975510..b704bc4 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
@@ -127,7 +127,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
*
* <p>
* Triggers bean creation if bean has read-only properties set through a constructor defined by the
- * {@link BeanConstructor @BeanConstructor} annotation.
+ * {@link Beanc @Beanc} annotation.
*
* @return The inner bean object.
*/
@@ -164,7 +164,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
*
* <p>
* If <c>create</c> is <jk>false</jk>, then this method may return <jk>null</jk> if the bean has read-only
- * properties set through a constructor defined by the {@link BeanConstructor @BeanConstructor} annotation.
+ * properties set through a constructor defined by the {@link Beanc @Beanc} annotation.
*
* <p>
* This method does NOT always return the bean in it's final state.
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 a00ca80..3e7fd31 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
@@ -89,7 +89,7 @@ public class BeanMeta<T> {
/** The constructor for this bean. */
protected final ConstructorInfo constructor;
- /** For beans with constructors with BeanConstructor annotation, this is the list of constructor arg properties. */
+ /** For beans with constructors with Beanc annotation, this is the list of constructor arg properties. */
protected final String[] constructorArgs;
private final MetadataMap extMeta; // Extended metadata
@@ -238,6 +238,25 @@ public class BeanMeta<T> {
}
constructor.setAccessible();
}
+ if (x.hasAnnotation(Beanc.class)) {
+ if (constructor != null)
+ throw new BeanRuntimeException(c, "Multiple instances of '@Beanc' found.");
+ constructor = x;
+ constructorArgs = split(x.getAnnotation(Beanc.class).properties());
+ if (constructorArgs.length != x.getParamCount()) {
+ if (constructorArgs.length != 0)
+ throw new BeanRuntimeException(c, "Number of properties defined in '@Beanc' annotation does not match number of parameters in constructor.");
+ constructorArgs = new String[x.getParamCount()];
+ int i = 0;
+ for (ParamInfo pi : x.getParams()) {
+ String pn = pi.getName();
+ if (pn == null)
+ throw new BeanRuntimeException(c, "Could not find name for parameter #{0} of constructor ''{1}''", i, x.getFullName());
+ constructorArgs[i++] = pn;
+ }
+ }
+ constructor.setAccessible();
+ }
}
// If this is an interface, look for impl classes defined in the context.
@@ -396,7 +415,7 @@ public class BeanMeta<T> {
for (String fp : constructorArgs) {
BeanPropertyMeta.Builder m = normalProps.get(fp);
if (m == null)
- throw new BeanRuntimeException(c, "The property ''{0}'' was defined on the @BeanConstructor(properties=X) annotation but was not found on the class definition.", fp);
+ throw new BeanRuntimeException(c, "The property ''{0}'' was defined on the @Beanc(properties=X) annotation but was not found on the class definition.", fp);
m.setAsConstructorArg();
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
index 6779244..11b4f49 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
@@ -68,7 +68,7 @@ public class UriContext {
* @param pathInfo
* The path info (e.g. <js>"/path-info"</js>, or <js>"path-info"</js>)
*/
- @BeanConstructor
+ @Beanc
public UriContext(@Name("authority") String authority, @Name("contextRoot") String contextRoot, @Name("servletPath") String servletPath, @Name("pathInfo") String pathInfo) {
this.authority = nullIfEmpty(trimSlashes(authority));
this.contextRoot = nullIfEmpty(trimSlashes(contextRoot));
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
index bcc48c3..7716c67 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
@@ -45,11 +45,14 @@ import org.apache.juneau.*;
* <ul class='seealso'>
* <li class='link'>{@doc juneau-marshall.Transforms.BeanConstructorAnnotation}
* </ul>
+ *
+ * @deprecated Use {@link Beanc}
*/
@Documented
@Target(CONSTRUCTOR)
@Retention(RUNTIME)
@Inherited
+@Deprecated
public @interface BeanConstructor {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java
similarity index 92%
copy from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
copy to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java
index bcc48c3..ef4b367 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConstructor.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java
@@ -43,19 +43,19 @@ import org.apache.juneau.*;
* Multiple calls to {@link BeanMap#getBean()} will return the same bean instance.
*
* <ul class='seealso'>
- * <li class='link'>{@doc juneau-marshall.Transforms.BeanConstructorAnnotation}
+ * <li class='link'>{@doc juneau-marshall.Transforms.BeancAnnotation}
* </ul>
*/
@Documented
@Target(CONSTRUCTOR)
@Retention(RUNTIME)
@Inherited
-public @interface BeanConstructor {
+public @interface Beanc {
/**
* The names of the properties of the constructor arguments.
* <p>
- * The {@link org.apache.juneau.annotation.BeanConstructor @BeanConstructor} annotation is used to
+ * The {@link org.apache.juneau.annotation.Beanc @Beanc} annotation is used to
* map constructor arguments to property names on bean with read-only properties.
* <br>Since method parameter names are lost during compilation, this annotation essentially redefines
* them so that they are available at runtime.
@@ -69,7 +69,7 @@ public @interface BeanConstructor {
* <jk>private final</jk> String <jf>name</jf>;
* <jk>private final int</jk> <jf>age</jf>;
*
- * <ja>@BeanConstructor</ja>(properties=<js>"name,age"</js>)
+ * <ja>@Beanc</ja>(properties=<js>"name,age"</js>)
* <jk>public</jk> Person(String name, <jk>int</jk> age) {
* <jk>this</jk>.<jf>name</jf> = name;
* <jk>this</jk>.<jf>age</jf> = age;
diff --git a/juneau-doc/docs/ReleaseNotes/5.0.0.02.html b/juneau-doc/docs/ReleaseNotes/5.0.0.02.html
index b010aa2..480c5cf 100644
--- a/juneau-doc/docs/ReleaseNotes/5.0.0.02.html
+++ b/juneau-doc/docs/ReleaseNotes/5.0.0.02.html
@@ -39,7 +39,7 @@
</li>
<li>
Support for parsing into beans with read-only properties.<br>
- New {@link oaj.annotation.BeanConstructor @BeanConstructor} annotation allows you to specify bean property values to be passed in through a constructor.
+ New <dc>@BeanConstructor</dc> annotation allows you to specify bean property values to be passed in through a constructor.
</li>
<li>
Separated the rest library into separate independent client and server libraries.<br>
diff --git a/juneau-doc/docs/ReleaseNotes/5.0.0.03.html b/juneau-doc/docs/ReleaseNotes/5.0.0.03.html
index 1c10152..3571598 100644
--- a/juneau-doc/docs/ReleaseNotes/5.0.0.03.html
+++ b/juneau-doc/docs/ReleaseNotes/5.0.0.03.html
@@ -21,7 +21,7 @@
<ul class='spaced-list'>
<li>
Support for parsing into read-only beans (i.e. beans with only getters, property values set through constructor args).<br>
- To support this, the {@link oaj.annotation.BeanConstructor @BeanConstructor} annotation has been added.
+ To support this, the <dc>@BeanConstructor</dc> annotation has been added.
</li>
<li>
Merged separate settings classes back into their base classes (simplifies the API).
diff --git a/juneau-doc/docs/ReleaseNotes/8.1.2.html b/juneau-doc/docs/ReleaseNotes/8.1.2.html
index 6e379fe..b66c0e5 100644
--- a/juneau-doc/docs/ReleaseNotes/8.1.2.html
+++ b/juneau-doc/docs/ReleaseNotes/8.1.2.html
@@ -44,6 +44,8 @@
<li>
{@link oaj.annotation.Beanp @Beanp} replaces {@link oaj.annotation.BeanProperty @BeanProperty} with shorter syntax.
<li>
+ {@link oaj.annotation.Beanc @Beanc} replaces {@link oaj.annotation.BeanConstructor @BeanConstructor} with shorter syntax.
+ <li>
Shortened names for {@link oaj.annotation.Bean#dictionary @Bean(dictionary)} and {@link oaj.BeanContextBuilder#dictionary(Class...)}.
</ul>
diff --git a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms.html b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms.html
index 4c90bb5..0118c63 100644
--- a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms.html
+++ b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms.html
@@ -53,15 +53,15 @@ Transforms
{@link oaj.annotation.Bean}
- Used to tailor how beans get interpreted by the framework.
<li class='ja'>
- {@link oaj.annotation.BeanConstructor}
+ {@link oaj.annotation.Beanc}
- Maps constructor arguments to property names on beans with read-only properties.
<li class='ja'>
+ {@link oaj.annotation.Beanp}
+ - Used to tailor how bean properties get interpreted by the framework.
+ <li class='ja'>
{@link oaj.annotation.BeanIgnore}
- Ignore classes, fields, and methods from being interpreted as bean or bean components.
<li class='ja'>
- {@link oaj.annotation.BeanProperty}
- - Used to tailor how bean properties get interpreted by the framework.
- <li class='ja'>
{@link oaj.annotation.NameProperty}
- Identifies a setter as a method for setting the name of a POJO as it's known by its parent object.
<li class='ja'>
diff --git a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeanConstructorAnnotation.html b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeanConstructorAnnotation.html
index 47219c8..d3b1f14 100644
--- a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeanConstructorAnnotation.html
+++ b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/11.BeanConstructorAnnotation.html
@@ -13,10 +13,10 @@
***************************************************************************************************************************/
-->
-@BeanConstructor Annotation
+@BeancAnnotation
<p>
- The {@link oaj.annotation.BeanConstructor @BeanConstructor} annotation is used to
+ The {@link oaj.annotation.Beanc @Beanc} annotation is used to
map constructor arguments to property names on bean with read-only properties.
Since method parameter names are lost during compilation, this annotation essentially redefines
them so that they are available at runtime.
@@ -30,7 +30,7 @@
<jk>private final</jk> String <jf>name</jf>;
<jk>private final int</jk> <jf>age</jf>;
- <ja>@BeanConstructor</ja>(properties=<js>"name,age"</js>})
+ <ja>@Beanc</ja>(properties=<js>"name,age"</js>})
<jk>public</jk> Person(String name, <jk>int</jk> age) {
<jk>this</jk>.<jf>name</jf> = name;
<jk>this</jk>.<jf>age</jf> = age;
@@ -59,16 +59,16 @@
Beans can also be defined with a combination of read-only and read-write properties.
</p>
<p>
- The {@link oaj.annotation.Name @Name} annotation can also be used instead of <c><ja>@BeanConstructor</ja>(properties)</c>:
+ The {@link oaj.annotation.Name @Name} annotation can also be used instead of <c><ja>@Beanc</ja>(properties)</c>:
</p>
<p class='bpcode w800'>
- <ja>@BeanConstructor</ja>
+ <ja>@Beanc</ja>
<jk>public</jk> Person(<ja>@Name</ja>(<js>"name"</js>) String name, <ja>@Name</ja>(<js>"age"</js>) <jk>int</jk> age) {
<jk>this</jk>.<jf>name</jf> = name;
<jk>this</jk>.<jf>age</jf> = age;
}
</p>
<p>
- If neither <c><ja>@BeanConstructor</ja>(properties)</c> or <ja>@Name</ja> is used to identify the bean property names,
+ If neither <c><ja>@Beanc</ja>(properties)</c> or <ja>@Name</ja> is used to identify the bean property names,
we will try to use the parameter names if they are available in the bytecode.
</p>
diff --git a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/15.PojoBuilders.html b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/15.PojoBuilders.html
index 65f84e4..d2c8ba3 100644
--- a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/15.PojoBuilders.html
+++ b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/15.PojoBuilders.html
@@ -18,7 +18,7 @@ POJO Builders
<p>
Juneau parsers can use builders to instantiate POJOs.
This is useful in cases where you want to create beans with read-only properties.
- Note that while it's possible to do this using the {@link oaj.annotation.BeanConstructor @BeanConstructor}
+ Note that while it's possible to do this using the {@link oaj.annotation.Beanc @Beanc}
annotation, using builders can often be cleaner.
</p>
<p>
diff --git a/juneau-doc/docs/Topics/02.juneau-marshall/18.JacksonComparison.html b/juneau-doc/docs/Topics/02.juneau-marshall/18.JacksonComparison.html
index 33c069f..4a18a53 100644
--- a/juneau-doc/docs/Topics/02.juneau-marshall/18.JacksonComparison.html
+++ b/juneau-doc/docs/Topics/02.juneau-marshall/18.JacksonComparison.html
@@ -75,7 +75,7 @@ Comparison with Jackson
<br><ja>@JsonProperty</ja>
</td>
<td>
- {@link oaj.annotation.BeanConstructor @BeanConstructor}
+ {@link oaj.annotation.Beanc @Beanc}
</td>
</tr>
<tr>
diff --git a/juneau-doc/src/main/javadoc/resources/docs.txt b/juneau-doc/src/main/javadoc/resources/docs.txt
index f37f2fe..4a7af3d 100644
--- a/juneau-doc/src/main/javadoc/resources/docs.txt
+++ b/juneau-doc/src/main/javadoc/resources/docs.txt
@@ -179,7 +179,7 @@ juneau-marshall.SimpleVariableLanguage.VarResolvers = #juneau-marshall.SimpleVar
juneau-marshall.Transforms = #juneau-marshall.Transforms, Overview > juneau-marshall > Transforms
juneau-marshall.Transforms.AutoPojoSwaps = #juneau-marshall.Transforms.AutoPojoSwaps, Overview > juneau-marshall > Transforms > Auto-detected POJO swaps
juneau-marshall.Transforms.BeanAnnotation = #juneau-marshall.Transforms.BeanAnnotation, Overview > juneau-marshall > Transforms > @Bean Annotation
-juneau-marshall.Transforms.BeanConstructorAnnotation = #juneau-marshall.Transforms.BeanConstructorAnnotation, Overview > juneau-marshall > Transforms > @BeanConstructor Annotation
+juneau-marshall.Transforms.BeancAnnotation = #juneau-marshall.Transforms.BeancAnnotation, Overview > juneau-marshall > Transforms > @Beanc Annotation
juneau-marshall.Transforms.BeanFilters = #juneau-marshall.Transforms.BeanFilters, Overview > juneau-marshall > Transforms > BeanFilter Class
juneau-marshall.Transforms.BeanIgnoreAnnotation = #juneau-marshall.Transforms.BeanIgnoreAnnotation, Overview > juneau-marshall > Transforms > @BeanIgnore Annotation
juneau-marshall.Transforms.BeanpAnnotation = #juneau-marshall.Transforms.BeanpAnnotation, Overview > juneau-marshall > Transforms > @Beanp Annotation
diff --git a/juneau-doc/src/main/javadoc/resources/fragments/about.html b/juneau-doc/src/main/javadoc/resources/fragments/about.html
deleted file mode 100644
index 55ee3e0..0000000
--- a/juneau-doc/src/main/javadoc/resources/fragments/about.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!--
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
- -->
-<p>
- Apache Juneau™ is a single cohesive Java ecosystem consisting of the following parts:
-</p>
-<table class='styled w800'>
- <tr>
- <th>Group</th><th>Component</th><th>Description</th>
- </tr>
- <tr class='dark bb'>
- <td rowspan="5" style='text-align:center;font-weight:bold;padding:20px;' class='code'>juneau-core</td>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html#juneau-marshall'>juneau-marshall</a></td>
- <td>
- A universal toolkit for marshalling POJOs to a wide variety of content types using a common framework with no external library dependencies.
- </td>
- </tr>
- <tr class='dark bb'>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html##juneau-marshall-rdf'>juneau-marshall-rdf</a></td>
- <td>
- Extended marshalling support for RDF languages.
- </td>
- </tr>
- <tr class='dark bb'>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html##juneau-dto'>juneau-dto</a></td>
- <td>
- A variety of predefined DTOs for serializing and parsing languages such as HTML5, Swagger and ATOM.
- </td>
- </tr>
- <tr class='dark bb'>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html##juneau-config'>juneau-config</a></td>
- <td>
- A sophisticated configuration file API.
- </td>
- </tr>
- <tr class='light bb'>
- <td rowspan="4" style='text-align:center;font-weight:bold;padding:20px;' class='code'>juneau-rest</td>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html##juneau-rest-server'>juneau-rest-server</a></td>
- <td>
- A universal REST server API for creating Swagger-based self-documenting REST interfaces using POJOs, simply deployed as
- one or more top-level servlets in any Servlet 3.1.0+ container.
- </td>
- </tr>
- <tr class='light bb'>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html##juneau-rest-server-springboot'>juneau-rest-server-springboot</a></td>
- <td>
- Spring Boot integration support
- </td>
- </tr>
- <tr class='light bb'>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html##juneau-rest-server-jaxrs'>juneau-rest-server-jaxrs</a></td>
- <td>
- JAX/RS integration support.
- </td>
- </tr>
- <tr class='light bb'>
- <td class='code'><a class='doclink' href='http://juneau.apache.org/site/apidocs-{@property juneauVersion}/overview-summary.html##juneau-rest-client'>juneau-rest-client</a></td>
- <td>
- A universal REST client API for interacting with Juneau or 3rd-party REST interfaces using POJOs and proxy interfaces.
- </td>
- </tr>
-</table>
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java
index 8dd06e9..91884a0 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java
@@ -77,7 +77,7 @@ public class HtmlComplexExample {
assert parse.getInnerPojo().getName().equals(pojoc.getInnerPojo().getName());
assert parse.getInnerPojo().getId().equals(pojoc.getInnerPojo().getId());
- // The object above can be parsed thanks to the @BeanConstructor(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java
index 5a280c5..ba17671 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java
@@ -61,7 +61,7 @@ public class HtmlSimpleExample {
String docSerialized = HtmlDocSerializer.DEFAULT.serialize(pojo);
System.out.println(docSerialized);
- // The object above can be parsed thanks to the @BeanConstructor(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java
index 71b5a03..dc6246d 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java
@@ -72,7 +72,7 @@ public class JsonComplexExample {
assert parse.getInnerPojo().getName().equals(pojoc.getInnerPojo().getName());
assert parse.getInnerPojo().getId().equals(pojoc.getInnerPojo().getId());
- // The object above can be parsed thanks to the @BeanConstructor(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java
index 8ab418d..0e5aba8 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java
@@ -80,7 +80,7 @@ public class JsonSimpleExample {
Long l3 = jsonParser.parse(json, Long.class);
Float f3 = jsonParser.parse(json, Float.class);
- // The object above can be parsed thanks to the @BeanConstructor(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
index c540715..aea501f 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
@@ -79,7 +79,7 @@ public class OapiExample {
HttpPartParser p = OpenApiParser.DEFAULT;
pojo = p.parse(schemab, httpPart, Pojo.class);
- // The object above can be parsed thanks to the @BeanConstructor(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
index ab1fbfb..b5302e3 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
@@ -36,7 +36,7 @@ public class Pojo {
* @param id The <bc>id</bc> property value.
* @param name The <bc>name</bc> property value.
*/
- @BeanConstructor
+ @Beanc
public Pojo(@Name("id") String id, @Name("name") String name) {
this.id = id;
this.name = name;
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java
index 760d653..eb8cabf 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java
@@ -36,7 +36,7 @@ public class PojoComplex {
* @param innerPojo The <bc>innerPojo</bc> property value.
* @param values The <bc>values</bc> property value.
*/
- @BeanConstructor
+ @Beanc
public PojoComplex(@Name("id") String id, @Name("innerPojo") Pojo innerPojo, @Name("values") HashMap<String, List<Pojo>> values) {
this.id = id;
this.innerPojo = innerPojo;
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UONExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UONExample.java
index ce8b9e5..33a7749 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UONExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UONExample.java
@@ -56,7 +56,7 @@ public class UONExample {
assert obj.getId().equals(pojo.getId());
assert obj.getName().equals(pojo.getName());
- // The object above can be parsed thanks to the @BeanConstructor annotation on PojoComplex
+ // The object above can be parsed thanks to the @Beanc annotation on PojoComplex
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java
index 23a7bb4..f3cf4e0 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java
@@ -57,7 +57,7 @@ public class XmlComplexExample {
assert obj.getClass().equals(pojoc.getClass());
assert obj.getInnerPojo().getId().equals(pojoc.getInnerPojo().getId());
- // The object above can be parsed thanks to the @BeanConstructor annotation on PojoComplex
+ // The object above can be parsed thanks to the @Beanc annotation on PojoComplex
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java
index a27a473..17a7046 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java
@@ -53,7 +53,7 @@ public class XmlSimpleExample {
assert obj.getId().equals(pojo.getId());
assert obj.getName().equals(pojo.getName());
- // The object above can be parsed thanks to the @BeanConstructor annotation on PojoComplex
+ // The object above can be parsed thanks to the @Beanc annotation on PojoComplex
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}