juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [5/9] incubator-juneau-website git commit: DynaBeans support added.
Date Thu, 04 May 2017 16:58:11 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/46c4861b/content/site/apidocs/src-html/org/apache/juneau/BeanMeta.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/BeanMeta.html b/content/site/apidocs/src-html/org/apache/juneau/BeanMeta.html
index bdc21a0..5ac969b 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/BeanMeta.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/BeanMeta.html
@@ -97,675 +97,691 @@
 <span class="sourceLineNo">089</span>   // Other fields<a name="line.89"></a>
 <span class="sourceLineNo">090</span>   final String typePropertyName;                                      // "_type" property actual name.<a name="line.90"></a>
 <span class="sourceLineNo">091</span>   private final BeanPropertyMeta typeProperty;                        // "_type" mock bean property.<a name="line.91"></a>
-<span class="sourceLineNo">092</span>   final BeanPropertyMeta extrasProperty;                              // "extras" property.<a name="line.92"></a>
+<span class="sourceLineNo">092</span>   final BeanPropertyMeta dynaProperty;                                // "extras" property.<a name="line.92"></a>
 <span class="sourceLineNo">093</span>   private final String dictionaryName;                                // The @Bean.typeName() annotation defined on this bean class.<a name="line.93"></a>
 <span class="sourceLineNo">094</span>   final String notABeanReason;                                        // Readable string explaining why this class wasn't a bean.<a name="line.94"></a>
 <span class="sourceLineNo">095</span>   final BeanRegistry beanRegistry;<a name="line.95"></a>
-<span class="sourceLineNo">096</span><a name="line.96"></a>
-<span class="sourceLineNo">097</span>   /**<a name="line.97"></a>
-<span class="sourceLineNo">098</span>    * Constructor.<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    *<a name="line.99"></a>
-<span class="sourceLineNo">100</span>    * @param classMeta The target class.<a name="line.100"></a>
-<span class="sourceLineNo">101</span>    * @param ctx The bean context that created this object.<a name="line.101"></a>
-<span class="sourceLineNo">102</span>    * @param beanFilter Optional bean filter associated with the target class.  Can be &lt;jk&gt;null&lt;/jk&gt;.<a name="line.102"></a>
-<span class="sourceLineNo">103</span>    * @param pNames Explicit list of property names and order of properties.  If &lt;jk&gt;null&lt;/jk&gt;, determine automatically.<a name="line.103"></a>
-<span class="sourceLineNo">104</span>    */<a name="line.104"></a>
-<span class="sourceLineNo">105</span>   protected BeanMeta(final ClassMeta&lt;T&gt; classMeta, BeanContext ctx, BeanFilter beanFilter, String[] pNames) {<a name="line.105"></a>
-<span class="sourceLineNo">106</span>      this.classMeta = classMeta;<a name="line.106"></a>
-<span class="sourceLineNo">107</span>      this.ctx = ctx;<a name="line.107"></a>
-<span class="sourceLineNo">108</span>      this.c = classMeta.getInnerClass();<a name="line.108"></a>
-<span class="sourceLineNo">109</span><a name="line.109"></a>
-<span class="sourceLineNo">110</span>      Builder&lt;T&gt; b = new Builder&lt;T&gt;(classMeta, ctx, beanFilter, pNames);<a name="line.110"></a>
-<span class="sourceLineNo">111</span>      this.notABeanReason = b.init(this);<a name="line.111"></a>
-<span class="sourceLineNo">112</span><a name="line.112"></a>
-<span class="sourceLineNo">113</span>      this.beanFilter = beanFilter;<a name="line.113"></a>
-<span class="sourceLineNo">114</span>      this.dictionaryName = b.dictionaryName;<a name="line.114"></a>
-<span class="sourceLineNo">115</span>      this.properties = b.properties == null ? null : Collections.unmodifiableMap(b.properties);<a name="line.115"></a>
-<span class="sourceLineNo">116</span>      this.getterProps = Collections.unmodifiableMap(b.getterProps);<a name="line.116"></a>
-<span class="sourceLineNo">117</span>      this.setterProps = Collections.unmodifiableMap(b.setterProps);<a name="line.117"></a>
-<span class="sourceLineNo">118</span>      this.extrasProperty = b.extrasProperty;<a name="line.118"></a>
-<span class="sourceLineNo">119</span>      this.typeVarImpls = b.typeVarImpls == null ? null : Collections.unmodifiableMap(b.typeVarImpls);<a name="line.119"></a>
-<span class="sourceLineNo">120</span>      this.constructor = b.constructor;<a name="line.120"></a>
-<span class="sourceLineNo">121</span>      this.constructorArgs = b.constructorArgs;<a name="line.121"></a>
-<span class="sourceLineNo">122</span>      this.extMeta = b.extMeta;<a name="line.122"></a>
-<span class="sourceLineNo">123</span>      this.beanRegistry = b.beanRegistry;<a name="line.123"></a>
-<span class="sourceLineNo">124</span>      this.typePropertyName = b.typePropertyName;<a name="line.124"></a>
-<span class="sourceLineNo">125</span>      this.typeProperty = new BeanPropertyMeta.Builder(this, typePropertyName, ctx.string(), beanRegistry).build();<a name="line.125"></a>
-<span class="sourceLineNo">126</span>   }<a name="line.126"></a>
-<span class="sourceLineNo">127</span><a name="line.127"></a>
-<span class="sourceLineNo">128</span>   private static final class Builder&lt;T&gt; {<a name="line.128"></a>
-<span class="sourceLineNo">129</span>      ClassMeta&lt;T&gt; classMeta;<a name="line.129"></a>
-<span class="sourceLineNo">130</span>      BeanContext ctx;<a name="line.130"></a>
-<span class="sourceLineNo">131</span>      BeanFilter beanFilter;<a name="line.131"></a>
-<span class="sourceLineNo">132</span>      String[] pNames;<a name="line.132"></a>
-<span class="sourceLineNo">133</span>      Map&lt;String,BeanPropertyMeta&gt; properties;<a name="line.133"></a>
-<span class="sourceLineNo">134</span>      Map&lt;Method,String&gt; getterProps = new HashMap&lt;Method,String&gt;();<a name="line.134"></a>
-<span class="sourceLineNo">135</span>      Map&lt;Method,String&gt; setterProps = new HashMap&lt;Method,String&gt;();<a name="line.135"></a>
-<span class="sourceLineNo">136</span>      BeanPropertyMeta extrasProperty;<a name="line.136"></a>
-<span class="sourceLineNo">137</span><a name="line.137"></a>
-<span class="sourceLineNo">138</span>      Map&lt;Class&lt;?&gt;,Class&lt;?&gt;[]&gt; typeVarImpls;<a name="line.138"></a>
-<span class="sourceLineNo">139</span>      Constructor&lt;T&gt; constructor;<a name="line.139"></a>
-<span class="sourceLineNo">140</span>      String[] constructorArgs = new String[0];<a name="line.140"></a>
-<span class="sourceLineNo">141</span>      MetadataMap extMeta = new MetadataMap();<a name="line.141"></a>
-<span class="sourceLineNo">142</span>      PropertyNamer propertyNamer;<a name="line.142"></a>
-<span class="sourceLineNo">143</span>      BeanRegistry beanRegistry;<a name="line.143"></a>
-<span class="sourceLineNo">144</span>      String dictionaryName, typePropertyName;<a name="line.144"></a>
-<span class="sourceLineNo">145</span><a name="line.145"></a>
-<span class="sourceLineNo">146</span>      private Builder(ClassMeta&lt;T&gt; classMeta, BeanContext ctx, BeanFilter beanFilter, String[] pNames) {<a name="line.146"></a>
-<span class="sourceLineNo">147</span>         this.classMeta = classMeta;<a name="line.147"></a>
-<span class="sourceLineNo">148</span>         this.ctx = ctx;<a name="line.148"></a>
-<span class="sourceLineNo">149</span>         this.beanFilter = beanFilter;<a name="line.149"></a>
-<span class="sourceLineNo">150</span>         this.pNames = pNames;<a name="line.150"></a>
-<span class="sourceLineNo">151</span>      }<a name="line.151"></a>
-<span class="sourceLineNo">152</span><a name="line.152"></a>
-<span class="sourceLineNo">153</span>      @SuppressWarnings("unchecked")<a name="line.153"></a>
-<span class="sourceLineNo">154</span>      private String init(BeanMeta&lt;T&gt; beanMeta) {<a name="line.154"></a>
-<span class="sourceLineNo">155</span>         Class&lt;?&gt; c = classMeta.getInnerClass();<a name="line.155"></a>
-<span class="sourceLineNo">156</span><a name="line.156"></a>
-<span class="sourceLineNo">157</span>         try {<a name="line.157"></a>
-<span class="sourceLineNo">158</span>            Visibility<a name="line.158"></a>
-<span class="sourceLineNo">159</span>               conVis = ctx.beanConstructorVisibility,<a name="line.159"></a>
-<span class="sourceLineNo">160</span>               cVis = ctx.beanClassVisibility,<a name="line.160"></a>
-<span class="sourceLineNo">161</span>               mVis = ctx.beanMethodVisibility,<a name="line.161"></a>
-<span class="sourceLineNo">162</span>               fVis = ctx.beanFieldVisibility;<a name="line.162"></a>
-<span class="sourceLineNo">163</span><a name="line.163"></a>
-<span class="sourceLineNo">164</span>            List&lt;Class&lt;?&gt;&gt; bdClasses = new ArrayList&lt;Class&lt;?&gt;&gt;();<a name="line.164"></a>
-<span class="sourceLineNo">165</span>            if (beanFilter != null &amp;&amp; beanFilter.getBeanDictionary() != null)<a name="line.165"></a>
-<span class="sourceLineNo">166</span>               bdClasses.addAll(Arrays.asList(beanFilter.getBeanDictionary()));<a name="line.166"></a>
-<span class="sourceLineNo">167</span>            Bean bean = classMeta.innerClass.getAnnotation(Bean.class);<a name="line.167"></a>
-<span class="sourceLineNo">168</span>            if (bean != null) {<a name="line.168"></a>
-<span class="sourceLineNo">169</span>               if (! bean.typeName().isEmpty())<a name="line.169"></a>
-<span class="sourceLineNo">170</span>                  bdClasses.add(classMeta.innerClass);<a name="line.170"></a>
-<span class="sourceLineNo">171</span>            }<a name="line.171"></a>
-<span class="sourceLineNo">172</span>            this.beanRegistry = new BeanRegistry(ctx, null, bdClasses.toArray(new Class&lt;?&gt;[bdClasses.size()]));<a name="line.172"></a>
-<span class="sourceLineNo">173</span><a name="line.173"></a>
-<span class="sourceLineNo">174</span>            for (Bean b : ReflectionUtils.findAnnotationsParentFirst(Bean.class, classMeta.innerClass))<a name="line.174"></a>
-<span class="sourceLineNo">175</span>               if (! b.typePropertyName().isEmpty())<a name="line.175"></a>
-<span class="sourceLineNo">176</span>                  typePropertyName = b.typePropertyName();<a name="line.176"></a>
-<span class="sourceLineNo">177</span>            if (typePropertyName == null)<a name="line.177"></a>
-<span class="sourceLineNo">178</span>               typePropertyName = ctx.getBeanTypePropertyName();<a name="line.178"></a>
-<span class="sourceLineNo">179</span><a name="line.179"></a>
-<span class="sourceLineNo">180</span>            // If @Bean.interfaceClass is specified on the parent class, then we want<a name="line.180"></a>
-<span class="sourceLineNo">181</span>            // to use the properties defined on that class, not the subclass.<a name="line.181"></a>
-<span class="sourceLineNo">182</span>            Class&lt;?&gt; c2 = (beanFilter != null &amp;&amp; beanFilter.getInterfaceClass() != null ? beanFilter.getInterfaceClass() : c);<a name="line.182"></a>
-<span class="sourceLineNo">183</span><a name="line.183"></a>
-<span class="sourceLineNo">184</span>            Class&lt;?&gt; stopClass = (beanFilter != null ? beanFilter.getStopClass() : Object.class);<a name="line.184"></a>
-<span class="sourceLineNo">185</span>            if (stopClass == null)<a name="line.185"></a>
-<span class="sourceLineNo">186</span>               stopClass = Object.class;<a name="line.186"></a>
-<span class="sourceLineNo">187</span><a name="line.187"></a>
-<span class="sourceLineNo">188</span>            Map&lt;String,BeanPropertyMeta.Builder&gt; normalProps = new LinkedHashMap&lt;String,BeanPropertyMeta.Builder&gt;();<a name="line.188"></a>
-<span class="sourceLineNo">189</span><a name="line.189"></a>
-<span class="sourceLineNo">190</span>            /// See if this class matches one the patterns in the exclude-class list.<a name="line.190"></a>
-<span class="sourceLineNo">191</span>            if (ctx.isNotABean(c))<a name="line.191"></a>
-<span class="sourceLineNo">192</span>               return "Class matches exclude-class list";<a name="line.192"></a>
-<span class="sourceLineNo">193</span><a name="line.193"></a>
-<span class="sourceLineNo">194</span>            if (! cVis.isVisible(c.getModifiers()))<a name="line.194"></a>
-<span class="sourceLineNo">195</span>               return "Class is not public";<a name="line.195"></a>
+<span class="sourceLineNo">096</span>   final boolean sortProperties;<a name="line.96"></a>
+<span class="sourceLineNo">097</span><a name="line.97"></a>
+<span class="sourceLineNo">098</span>   /**<a name="line.98"></a>
+<span class="sourceLineNo">099</span>    * Constructor.<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    *<a name="line.100"></a>
+<span class="sourceLineNo">101</span>    * @param classMeta The target class.<a name="line.101"></a>
+<span class="sourceLineNo">102</span>    * @param ctx The bean context that created this object.<a name="line.102"></a>
+<span class="sourceLineNo">103</span>    * @param beanFilter Optional bean filter associated with the target class.  Can be &lt;jk&gt;null&lt;/jk&gt;.<a name="line.103"></a>
+<span class="sourceLineNo">104</span>    * @param pNames Explicit list of property names and order of properties.  If &lt;jk&gt;null&lt;/jk&gt;, determine automatically.<a name="line.104"></a>
+<span class="sourceLineNo">105</span>    */<a name="line.105"></a>
+<span class="sourceLineNo">106</span>   protected BeanMeta(final ClassMeta&lt;T&gt; classMeta, BeanContext ctx, BeanFilter beanFilter, String[] pNames) {<a name="line.106"></a>
+<span class="sourceLineNo">107</span>      this.classMeta = classMeta;<a name="line.107"></a>
+<span class="sourceLineNo">108</span>      this.ctx = ctx;<a name="line.108"></a>
+<span class="sourceLineNo">109</span>      this.c = classMeta.getInnerClass();<a name="line.109"></a>
+<span class="sourceLineNo">110</span><a name="line.110"></a>
+<span class="sourceLineNo">111</span>      Builder&lt;T&gt; b = new Builder&lt;T&gt;(classMeta, ctx, beanFilter, pNames);<a name="line.111"></a>
+<span class="sourceLineNo">112</span>      this.notABeanReason = b.init(this);<a name="line.112"></a>
+<span class="sourceLineNo">113</span><a name="line.113"></a>
+<span class="sourceLineNo">114</span>      this.beanFilter = beanFilter;<a name="line.114"></a>
+<span class="sourceLineNo">115</span>      this.dictionaryName = b.dictionaryName;<a name="line.115"></a>
+<span class="sourceLineNo">116</span>      this.properties = b.properties == null ? null : Collections.unmodifiableMap(b.properties);<a name="line.116"></a>
+<span class="sourceLineNo">117</span>      this.getterProps = Collections.unmodifiableMap(b.getterProps);<a name="line.117"></a>
+<span class="sourceLineNo">118</span>      this.setterProps = Collections.unmodifiableMap(b.setterProps);<a name="line.118"></a>
+<span class="sourceLineNo">119</span>      this.dynaProperty = b.dynaProperty;<a name="line.119"></a>
+<span class="sourceLineNo">120</span>      this.typeVarImpls = b.typeVarImpls == null ? null : Collections.unmodifiableMap(b.typeVarImpls);<a name="line.120"></a>
+<span class="sourceLineNo">121</span>      this.constructor = b.constructor;<a name="line.121"></a>
+<span class="sourceLineNo">122</span>      this.constructorArgs = b.constructorArgs;<a name="line.122"></a>
+<span class="sourceLineNo">123</span>      this.extMeta = b.extMeta;<a name="line.123"></a>
+<span class="sourceLineNo">124</span>      this.beanRegistry = b.beanRegistry;<a name="line.124"></a>
+<span class="sourceLineNo">125</span>      this.typePropertyName = b.typePropertyName;<a name="line.125"></a>
+<span class="sourceLineNo">126</span>      this.typeProperty = new BeanPropertyMeta.Builder(this, typePropertyName, ctx.string(), beanRegistry).build();<a name="line.126"></a>
+<span class="sourceLineNo">127</span>      this.sortProperties = b.sortProperties;<a name="line.127"></a>
+<span class="sourceLineNo">128</span>   }<a name="line.128"></a>
+<span class="sourceLineNo">129</span><a name="line.129"></a>
+<span class="sourceLineNo">130</span>   private static final class Builder&lt;T&gt; {<a name="line.130"></a>
+<span class="sourceLineNo">131</span>      ClassMeta&lt;T&gt; classMeta;<a name="line.131"></a>
+<span class="sourceLineNo">132</span>      BeanContext ctx;<a name="line.132"></a>
+<span class="sourceLineNo">133</span>      BeanFilter beanFilter;<a name="line.133"></a>
+<span class="sourceLineNo">134</span>      String[] pNames;<a name="line.134"></a>
+<span class="sourceLineNo">135</span>      Map&lt;String,BeanPropertyMeta&gt; properties;<a name="line.135"></a>
+<span class="sourceLineNo">136</span>      Map&lt;Method,String&gt; getterProps = new HashMap&lt;Method,String&gt;();<a name="line.136"></a>
+<span class="sourceLineNo">137</span>      Map&lt;Method,String&gt; setterProps = new HashMap&lt;Method,String&gt;();<a name="line.137"></a>
+<span class="sourceLineNo">138</span>      BeanPropertyMeta dynaProperty;<a name="line.138"></a>
+<span class="sourceLineNo">139</span><a name="line.139"></a>
+<span class="sourceLineNo">140</span>      Map&lt;Class&lt;?&gt;,Class&lt;?&gt;[]&gt; typeVarImpls;<a name="line.140"></a>
+<span class="sourceLineNo">141</span>      Constructor&lt;T&gt; constructor;<a name="line.141"></a>
+<span class="sourceLineNo">142</span>      String[] constructorArgs = new String[0];<a name="line.142"></a>
+<span class="sourceLineNo">143</span>      MetadataMap extMeta = new MetadataMap();<a name="line.143"></a>
+<span class="sourceLineNo">144</span>      PropertyNamer propertyNamer;<a name="line.144"></a>
+<span class="sourceLineNo">145</span>      BeanRegistry beanRegistry;<a name="line.145"></a>
+<span class="sourceLineNo">146</span>      String dictionaryName, typePropertyName;<a name="line.146"></a>
+<span class="sourceLineNo">147</span>      boolean sortProperties;<a name="line.147"></a>
+<span class="sourceLineNo">148</span><a name="line.148"></a>
+<span class="sourceLineNo">149</span>      private Builder(ClassMeta&lt;T&gt; classMeta, BeanContext ctx, BeanFilter beanFilter, String[] pNames) {<a name="line.149"></a>
+<span class="sourceLineNo">150</span>         this.classMeta = classMeta;<a name="line.150"></a>
+<span class="sourceLineNo">151</span>         this.ctx = ctx;<a name="line.151"></a>
+<span class="sourceLineNo">152</span>         this.beanFilter = beanFilter;<a name="line.152"></a>
+<span class="sourceLineNo">153</span>         this.pNames = pNames;<a name="line.153"></a>
+<span class="sourceLineNo">154</span>      }<a name="line.154"></a>
+<span class="sourceLineNo">155</span><a name="line.155"></a>
+<span class="sourceLineNo">156</span>      @SuppressWarnings("unchecked")<a name="line.156"></a>
+<span class="sourceLineNo">157</span>      private String init(BeanMeta&lt;T&gt; beanMeta) {<a name="line.157"></a>
+<span class="sourceLineNo">158</span>         Class&lt;?&gt; c = classMeta.getInnerClass();<a name="line.158"></a>
+<span class="sourceLineNo">159</span><a name="line.159"></a>
+<span class="sourceLineNo">160</span>         try {<a name="line.160"></a>
+<span class="sourceLineNo">161</span>            Visibility<a name="line.161"></a>
+<span class="sourceLineNo">162</span>               conVis = ctx.beanConstructorVisibility,<a name="line.162"></a>
+<span class="sourceLineNo">163</span>               cVis = ctx.beanClassVisibility,<a name="line.163"></a>
+<span class="sourceLineNo">164</span>               mVis = ctx.beanMethodVisibility,<a name="line.164"></a>
+<span class="sourceLineNo">165</span>               fVis = ctx.beanFieldVisibility;<a name="line.165"></a>
+<span class="sourceLineNo">166</span><a name="line.166"></a>
+<span class="sourceLineNo">167</span>            List&lt;Class&lt;?&gt;&gt; bdClasses = new ArrayList&lt;Class&lt;?&gt;&gt;();<a name="line.167"></a>
+<span class="sourceLineNo">168</span>            if (beanFilter != null &amp;&amp; beanFilter.getBeanDictionary() != null)<a name="line.168"></a>
+<span class="sourceLineNo">169</span>               bdClasses.addAll(Arrays.asList(beanFilter.getBeanDictionary()));<a name="line.169"></a>
+<span class="sourceLineNo">170</span>            Bean bean = classMeta.innerClass.getAnnotation(Bean.class);<a name="line.170"></a>
+<span class="sourceLineNo">171</span>            if (bean != null) {<a name="line.171"></a>
+<span class="sourceLineNo">172</span>               if (! bean.typeName().isEmpty())<a name="line.172"></a>
+<span class="sourceLineNo">173</span>                  bdClasses.add(classMeta.innerClass);<a name="line.173"></a>
+<span class="sourceLineNo">174</span>            }<a name="line.174"></a>
+<span class="sourceLineNo">175</span>            this.beanRegistry = new BeanRegistry(ctx, null, bdClasses.toArray(new Class&lt;?&gt;[bdClasses.size()]));<a name="line.175"></a>
+<span class="sourceLineNo">176</span><a name="line.176"></a>
+<span class="sourceLineNo">177</span>            for (Bean b : ReflectionUtils.findAnnotationsParentFirst(Bean.class, classMeta.innerClass))<a name="line.177"></a>
+<span class="sourceLineNo">178</span>               if (! b.typePropertyName().isEmpty())<a name="line.178"></a>
+<span class="sourceLineNo">179</span>                  typePropertyName = b.typePropertyName();<a name="line.179"></a>
+<span class="sourceLineNo">180</span>            if (typePropertyName == null)<a name="line.180"></a>
+<span class="sourceLineNo">181</span>               typePropertyName = ctx.getBeanTypePropertyName();<a name="line.181"></a>
+<span class="sourceLineNo">182</span><a name="line.182"></a>
+<span class="sourceLineNo">183</span>            // If @Bean.interfaceClass is specified on the parent class, then we want<a name="line.183"></a>
+<span class="sourceLineNo">184</span>            // to use the properties defined on that class, not the subclass.<a name="line.184"></a>
+<span class="sourceLineNo">185</span>            Class&lt;?&gt; c2 = (beanFilter != null &amp;&amp; beanFilter.getInterfaceClass() != null ? beanFilter.getInterfaceClass() : c);<a name="line.185"></a>
+<span class="sourceLineNo">186</span><a name="line.186"></a>
+<span class="sourceLineNo">187</span>            Class&lt;?&gt; stopClass = (beanFilter != null ? beanFilter.getStopClass() : Object.class);<a name="line.187"></a>
+<span class="sourceLineNo">188</span>            if (stopClass == null)<a name="line.188"></a>
+<span class="sourceLineNo">189</span>               stopClass = Object.class;<a name="line.189"></a>
+<span class="sourceLineNo">190</span><a name="line.190"></a>
+<span class="sourceLineNo">191</span>            Map&lt;String,BeanPropertyMeta.Builder&gt; normalProps = new LinkedHashMap&lt;String,BeanPropertyMeta.Builder&gt;();<a name="line.191"></a>
+<span class="sourceLineNo">192</span><a name="line.192"></a>
+<span class="sourceLineNo">193</span>            /// See if this class matches one the patterns in the exclude-class list.<a name="line.193"></a>
+<span class="sourceLineNo">194</span>            if (ctx.isNotABean(c))<a name="line.194"></a>
+<span class="sourceLineNo">195</span>               return "Class matches exclude-class list";<a name="line.195"></a>
 <span class="sourceLineNo">196</span><a name="line.196"></a>
-<span class="sourceLineNo">197</span>            if (c.isAnnotationPresent(BeanIgnore.class))<a name="line.197"></a>
-<span class="sourceLineNo">198</span>               return "Class is annotated with @BeanIgnore";<a name="line.198"></a>
+<span class="sourceLineNo">197</span>            if (! cVis.isVisible(c.getModifiers()))<a name="line.197"></a>
+<span class="sourceLineNo">198</span>               return "Class is not public";<a name="line.198"></a>
 <span class="sourceLineNo">199</span><a name="line.199"></a>
-<span class="sourceLineNo">200</span>            // Make sure it's serializable.<a name="line.200"></a>
-<span class="sourceLineNo">201</span>            if (beanFilter == null &amp;&amp; ctx.beansRequireSerializable &amp;&amp; ! isParentClass(Serializable.class, c))<a name="line.201"></a>
-<span class="sourceLineNo">202</span>               return "Class is not serializable";<a name="line.202"></a>
-<span class="sourceLineNo">203</span><a name="line.203"></a>
-<span class="sourceLineNo">204</span>            // Look for @BeanConstructor constructor.<a name="line.204"></a>
-<span class="sourceLineNo">205</span>            for (Constructor&lt;?&gt; x : c.getConstructors()) {<a name="line.205"></a>
-<span class="sourceLineNo">206</span>               if (x.isAnnotationPresent(BeanConstructor.class)) {<a name="line.206"></a>
-<span class="sourceLineNo">207</span>                  if (constructor != null)<a name="line.207"></a>
-<span class="sourceLineNo">208</span>                     throw new BeanRuntimeException(c, "Multiple instances of '@BeanConstructor' found.");<a name="line.208"></a>
-<span class="sourceLineNo">209</span>                  constructor = (Constructor&lt;T&gt;)x;<a name="line.209"></a>
-<span class="sourceLineNo">210</span>                  constructorArgs = StringUtils.split(x.getAnnotation(BeanConstructor.class).properties(), ',');<a name="line.210"></a>
-<span class="sourceLineNo">211</span>                  if (constructorArgs.length != x.getParameterTypes().length)<a name="line.211"></a>
-<span class="sourceLineNo">212</span>                     throw new BeanRuntimeException(c, "Number of properties defined in '@BeanConstructor' annotation does not match number of parameters in constructor.");<a name="line.212"></a>
-<span class="sourceLineNo">213</span>                  if (! setAccessible(constructor))<a name="line.213"></a>
-<span class="sourceLineNo">214</span>                     throw new BeanRuntimeException(c, "Could not set accessibility to true on method with @BeanConstructor annotation.  Method=''{0}''", constructor.getName());<a name="line.214"></a>
-<span class="sourceLineNo">215</span>               }<a name="line.215"></a>
-<span class="sourceLineNo">216</span>            }<a name="line.216"></a>
-<span class="sourceLineNo">217</span><a name="line.217"></a>
-<span class="sourceLineNo">218</span>            // If this is an interface, look for impl classes defined in the context.<a name="line.218"></a>
-<span class="sourceLineNo">219</span>            if (constructor == null)<a name="line.219"></a>
-<span class="sourceLineNo">220</span>               constructor = (Constructor&lt;T&gt;)ctx.getImplClassConstructor(c, conVis);<a name="line.220"></a>
-<span class="sourceLineNo">221</span><a name="line.221"></a>
+<span class="sourceLineNo">200</span>            if (c.isAnnotationPresent(BeanIgnore.class))<a name="line.200"></a>
+<span class="sourceLineNo">201</span>               return "Class is annotated with @BeanIgnore";<a name="line.201"></a>
+<span class="sourceLineNo">202</span><a name="line.202"></a>
+<span class="sourceLineNo">203</span>            // Make sure it's serializable.<a name="line.203"></a>
+<span class="sourceLineNo">204</span>            if (beanFilter == null &amp;&amp; ctx.beansRequireSerializable &amp;&amp; ! isParentClass(Serializable.class, c))<a name="line.204"></a>
+<span class="sourceLineNo">205</span>               return "Class is not serializable";<a name="line.205"></a>
+<span class="sourceLineNo">206</span><a name="line.206"></a>
+<span class="sourceLineNo">207</span>            // Look for @BeanConstructor constructor.<a name="line.207"></a>
+<span class="sourceLineNo">208</span>            for (Constructor&lt;?&gt; x : c.getConstructors()) {<a name="line.208"></a>
+<span class="sourceLineNo">209</span>               if (x.isAnnotationPresent(BeanConstructor.class)) {<a name="line.209"></a>
+<span class="sourceLineNo">210</span>                  if (constructor != null)<a name="line.210"></a>
+<span class="sourceLineNo">211</span>                     throw new BeanRuntimeException(c, "Multiple instances of '@BeanConstructor' found.");<a name="line.211"></a>
+<span class="sourceLineNo">212</span>                  constructor = (Constructor&lt;T&gt;)x;<a name="line.212"></a>
+<span class="sourceLineNo">213</span>                  constructorArgs = StringUtils.split(x.getAnnotation(BeanConstructor.class).properties(), ',');<a name="line.213"></a>
+<span class="sourceLineNo">214</span>                  if (constructorArgs.length != x.getParameterTypes().length)<a name="line.214"></a>
+<span class="sourceLineNo">215</span>                     throw new BeanRuntimeException(c, "Number of properties defined in '@BeanConstructor' annotation does not match number of parameters in constructor.");<a name="line.215"></a>
+<span class="sourceLineNo">216</span>                  if (! setAccessible(constructor))<a name="line.216"></a>
+<span class="sourceLineNo">217</span>                     throw new BeanRuntimeException(c, "Could not set accessibility to true on method with @BeanConstructor annotation.  Method=''{0}''", constructor.getName());<a name="line.217"></a>
+<span class="sourceLineNo">218</span>               }<a name="line.218"></a>
+<span class="sourceLineNo">219</span>            }<a name="line.219"></a>
+<span class="sourceLineNo">220</span><a name="line.220"></a>
+<span class="sourceLineNo">221</span>            // If this is an interface, look for impl classes defined in the context.<a name="line.221"></a>
 <span class="sourceLineNo">222</span>            if (constructor == null)<a name="line.222"></a>
-<span class="sourceLineNo">223</span>               constructor = (Constructor&lt;T&gt;)findNoArgConstructor(c, conVis);<a name="line.223"></a>
+<span class="sourceLineNo">223</span>               constructor = (Constructor&lt;T&gt;)ctx.getImplClassConstructor(c, conVis);<a name="line.223"></a>
 <span class="sourceLineNo">224</span><a name="line.224"></a>
-<span class="sourceLineNo">225</span>            if (constructor == null &amp;&amp; beanFilter == null &amp;&amp; ctx.beansRequireDefaultConstructor)<a name="line.225"></a>
-<span class="sourceLineNo">226</span>               return "Class does not have the required no-arg constructor";<a name="line.226"></a>
+<span class="sourceLineNo">225</span>            if (constructor == null)<a name="line.225"></a>
+<span class="sourceLineNo">226</span>               constructor = (Constructor&lt;T&gt;)findNoArgConstructor(c, conVis);<a name="line.226"></a>
 <span class="sourceLineNo">227</span><a name="line.227"></a>
-<span class="sourceLineNo">228</span>            if (! setAccessible(constructor))<a name="line.228"></a>
-<span class="sourceLineNo">229</span>               throw new BeanRuntimeException(c, "Could not set accessibility to true on no-arg constructor");<a name="line.229"></a>
+<span class="sourceLineNo">228</span>            if (constructor == null &amp;&amp; beanFilter == null &amp;&amp; ctx.beansRequireDefaultConstructor)<a name="line.228"></a>
+<span class="sourceLineNo">229</span>               return "Class does not have the required no-arg constructor";<a name="line.229"></a>
 <span class="sourceLineNo">230</span><a name="line.230"></a>
-<span class="sourceLineNo">231</span>            // Explicitly defined property names in @Bean annotation.<a name="line.231"></a>
-<span class="sourceLineNo">232</span>            Set&lt;String&gt; fixedBeanProps = new LinkedHashSet&lt;String&gt;();<a name="line.232"></a>
+<span class="sourceLineNo">231</span>            if (! setAccessible(constructor))<a name="line.231"></a>
+<span class="sourceLineNo">232</span>               throw new BeanRuntimeException(c, "Could not set accessibility to true on no-arg constructor");<a name="line.232"></a>
 <span class="sourceLineNo">233</span><a name="line.233"></a>
-<span class="sourceLineNo">234</span>            if (beanFilter != null) {<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>               // Get the 'properties' attribute if specified.<a name="line.236"></a>
-<span class="sourceLineNo">237</span>               if (beanFilter.getProperties() != null)<a name="line.237"></a>
-<span class="sourceLineNo">238</span>                  for (String p : beanFilter.getProperties())<a name="line.238"></a>
-<span class="sourceLineNo">239</span>                     fixedBeanProps.add(p);<a name="line.239"></a>
-<span class="sourceLineNo">240</span><a name="line.240"></a>
-<span class="sourceLineNo">241</span>               if (beanFilter.getPropertyNamer() != null)<a name="line.241"></a>
-<span class="sourceLineNo">242</span>                  propertyNamer = beanFilter.getPropertyNamer();<a name="line.242"></a>
-<span class="sourceLineNo">243</span>            }<a name="line.243"></a>
-<span class="sourceLineNo">244</span><a name="line.244"></a>
-<span class="sourceLineNo">245</span>            if (propertyNamer == null)<a name="line.245"></a>
-<span class="sourceLineNo">246</span>               propertyNamer = new PropertyNamerDefault();<a name="line.246"></a>
+<span class="sourceLineNo">234</span>            // Explicitly defined property names in @Bean annotation.<a name="line.234"></a>
+<span class="sourceLineNo">235</span>            Set&lt;String&gt; fixedBeanProps = new LinkedHashSet&lt;String&gt;();<a name="line.235"></a>
+<span class="sourceLineNo">236</span><a name="line.236"></a>
+<span class="sourceLineNo">237</span>            if (beanFilter != null) {<a name="line.237"></a>
+<span class="sourceLineNo">238</span><a name="line.238"></a>
+<span class="sourceLineNo">239</span>               // Get the 'properties' attribute if specified.<a name="line.239"></a>
+<span class="sourceLineNo">240</span>               if (beanFilter.getProperties() != null)<a name="line.240"></a>
+<span class="sourceLineNo">241</span>                  for (String p : beanFilter.getProperties())<a name="line.241"></a>
+<span class="sourceLineNo">242</span>                     fixedBeanProps.add(p);<a name="line.242"></a>
+<span class="sourceLineNo">243</span><a name="line.243"></a>
+<span class="sourceLineNo">244</span>               if (beanFilter.getPropertyNamer() != null)<a name="line.244"></a>
+<span class="sourceLineNo">245</span>                  propertyNamer = beanFilter.getPropertyNamer();<a name="line.245"></a>
+<span class="sourceLineNo">246</span>            }<a name="line.246"></a>
 <span class="sourceLineNo">247</span><a name="line.247"></a>
-<span class="sourceLineNo">248</span>            // First populate the properties with those specified in the bean annotation to<a name="line.248"></a>
-<span class="sourceLineNo">249</span>            // ensure that ordering first.<a name="line.249"></a>
-<span class="sourceLineNo">250</span>            for (String name : fixedBeanProps)<a name="line.250"></a>
-<span class="sourceLineNo">251</span>               normalProps.put(name, new BeanPropertyMeta.Builder(beanMeta, name));<a name="line.251"></a>
-<span class="sourceLineNo">252</span><a name="line.252"></a>
-<span class="sourceLineNo">253</span>            if (ctx.useJavaBeanIntrospector) {<a name="line.253"></a>
-<span class="sourceLineNo">254</span>               BeanInfo bi = null;<a name="line.254"></a>
-<span class="sourceLineNo">255</span>               if (! c2.isInterface())<a name="line.255"></a>
-<span class="sourceLineNo">256</span>                  bi = Introspector.getBeanInfo(c2, stopClass);<a name="line.256"></a>
-<span class="sourceLineNo">257</span>               else<a name="line.257"></a>
-<span class="sourceLineNo">258</span>                  bi = Introspector.getBeanInfo(c2, null);<a name="line.258"></a>
-<span class="sourceLineNo">259</span>               if (bi != null) {<a name="line.259"></a>
-<span class="sourceLineNo">260</span>                  for (PropertyDescriptor pd : bi.getPropertyDescriptors()) {<a name="line.260"></a>
-<span class="sourceLineNo">261</span>                     String name = pd.getName();<a name="line.261"></a>
-<span class="sourceLineNo">262</span>                     if (! normalProps.containsKey(name))<a name="line.262"></a>
-<span class="sourceLineNo">263</span>                        normalProps.put(name, new BeanPropertyMeta.Builder(beanMeta, name));<a name="line.263"></a>
-<span class="sourceLineNo">264</span>                     normalProps.get(name).setGetter(pd.getReadMethod()).setSetter(pd.getWriteMethod());<a name="line.264"></a>
-<span class="sourceLineNo">265</span>                  }<a name="line.265"></a>
-<span class="sourceLineNo">266</span>               }<a name="line.266"></a>
-<span class="sourceLineNo">267</span><a name="line.267"></a>
-<span class="sourceLineNo">268</span>            } else /* Use 'better' introspection */ {<a name="line.268"></a>
-<span class="sourceLineNo">269</span><a name="line.269"></a>
-<span class="sourceLineNo">270</span>               for (Field f : findBeanFields(c2, stopClass, fVis)) {<a name="line.270"></a>
-<span class="sourceLineNo">271</span>                  String name = findPropertyName(f, fixedBeanProps);<a name="line.271"></a>
-<span class="sourceLineNo">272</span>                  if (name != null) {<a name="line.272"></a>
-<span class="sourceLineNo">273</span>                     if (! normalProps.containsKey(name))<a name="line.273"></a>
-<span class="sourceLineNo">274</span>                        normalProps.put(name, new BeanPropertyMeta.Builder(beanMeta, name));<a name="line.274"></a>
-<span class="sourceLineNo">275</span>                     normalProps.get(name).setField(f);<a name="line.275"></a>
-<span class="sourceLineNo">276</span>                  }<a name="line.276"></a>
-<span class="sourceLineNo">277</span>               }<a name="line.277"></a>
-<span class="sourceLineNo">278</span><a name="line.278"></a>
-<span class="sourceLineNo">279</span>               List&lt;BeanMethod&gt; bms = findBeanMethods(c2, stopClass, mVis, fixedBeanProps, propertyNamer);<a name="line.279"></a>
-<span class="sourceLineNo">280</span><a name="line.280"></a>
-<span class="sourceLineNo">281</span>               // Iterate through all the getters.<a name="line.281"></a>
-<span class="sourceLineNo">282</span>               for (BeanMethod bm : bms) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>                  String pn = bm.propertyName;<a name="line.283"></a>
-<span class="sourceLineNo">284</span>                  Method m = bm.method;<a name="line.284"></a>
-<span class="sourceLineNo">285</span>                  if (! normalProps.containsKey(pn))<a name="line.285"></a>
-<span class="sourceLineNo">286</span>                     normalProps.put(pn, new BeanPropertyMeta.Builder(beanMeta, pn));<a name="line.286"></a>
-<span class="sourceLineNo">287</span>                  BeanPropertyMeta.Builder bpm = normalProps.get(pn);<a name="line.287"></a>
-<span class="sourceLineNo">288</span>                  if (! bm.isSetter)<a name="line.288"></a>
-<span class="sourceLineNo">289</span>                     bpm.setGetter(m);<a name="line.289"></a>
-<span class="sourceLineNo">290</span>               }<a name="line.290"></a>
-<span class="sourceLineNo">291</span><a name="line.291"></a>
-<span class="sourceLineNo">292</span>               // Now iterate through all the setters.<a name="line.292"></a>
-<span class="sourceLineNo">293</span>               for (BeanMethod bm : bms) {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>                  if (bm.isSetter) {<a name="line.294"></a>
-<span class="sourceLineNo">295</span>                     BeanPropertyMeta.Builder bpm = normalProps.get(bm.propertyName);<a name="line.295"></a>
-<span class="sourceLineNo">296</span>                     if (bm.matchesPropertyType(bpm))<a name="line.296"></a>
-<span class="sourceLineNo">297</span>                        bpm.setSetter(bm.method);<a name="line.297"></a>
-<span class="sourceLineNo">298</span>                  }<a name="line.298"></a>
-<span class="sourceLineNo">299</span>               }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>            }<a name="line.300"></a>
-<span class="sourceLineNo">301</span><a name="line.301"></a>
-<span class="sourceLineNo">302</span>            typeVarImpls = new HashMap&lt;Class&lt;?&gt;,Class&lt;?&gt;[]&gt;();<a name="line.302"></a>
-<span class="sourceLineNo">303</span>            findTypeVarImpls(c, typeVarImpls);<a name="line.303"></a>
-<span class="sourceLineNo">304</span>            if (typeVarImpls.isEmpty())<a name="line.304"></a>
-<span class="sourceLineNo">305</span>               typeVarImpls = null;<a name="line.305"></a>
-<span class="sourceLineNo">306</span><a name="line.306"></a>
-<span class="sourceLineNo">307</span>            // Eliminate invalid properties, and set the contents of getterProps and setterProps.<a name="line.307"></a>
-<span class="sourceLineNo">308</span>            for (Iterator&lt;BeanPropertyMeta.Builder&gt; i = normalProps.values().iterator(); i.hasNext();) {<a name="line.308"></a>
-<span class="sourceLineNo">309</span>               BeanPropertyMeta.Builder p = i.next();<a name="line.309"></a>
-<span class="sourceLineNo">310</span>               try {<a name="line.310"></a>
-<span class="sourceLineNo">311</span>                  if (p.validate(ctx, beanRegistry, typeVarImpls)) {<a name="line.311"></a>
-<span class="sourceLineNo">312</span><a name="line.312"></a>
-<span class="sourceLineNo">313</span>                     if (p.getter != null)<a name="line.313"></a>
-<span class="sourceLineNo">314</span>                        getterProps.put(p.getter, p.name);<a name="line.314"></a>
+<span class="sourceLineNo">248</span>            if (propertyNamer == null)<a name="line.248"></a>
+<span class="sourceLineNo">249</span>               propertyNamer = new PropertyNamerDefault();<a name="line.249"></a>
+<span class="sourceLineNo">250</span><a name="line.250"></a>
+<span class="sourceLineNo">251</span>            // First populate the properties with those specified in the bean annotation to<a name="line.251"></a>
+<span class="sourceLineNo">252</span>            // ensure that ordering first.<a name="line.252"></a>
+<span class="sourceLineNo">253</span>            for (String name : fixedBeanProps)<a name="line.253"></a>
+<span class="sourceLineNo">254</span>               normalProps.put(name, new BeanPropertyMeta.Builder(beanMeta, name));<a name="line.254"></a>
+<span class="sourceLineNo">255</span><a name="line.255"></a>
+<span class="sourceLineNo">256</span>            if (ctx.useJavaBeanIntrospector) {<a name="line.256"></a>
+<span class="sourceLineNo">257</span>               BeanInfo bi = null;<a name="line.257"></a>
+<span class="sourceLineNo">258</span>               if (! c2.isInterface())<a name="line.258"></a>
+<span class="sourceLineNo">259</span>                  bi = Introspector.getBeanInfo(c2, stopClass);<a name="line.259"></a>
+<span class="sourceLineNo">260</span>               else<a name="line.260"></a>
+<span class="sourceLineNo">261</span>                  bi = Introspector.getBeanInfo(c2, null);<a name="line.261"></a>
+<span class="sourceLineNo">262</span>               if (bi != null) {<a name="line.262"></a>
+<span class="sourceLineNo">263</span>                  for (PropertyDescriptor pd : bi.getPropertyDescriptors()) {<a name="line.263"></a>
+<span class="sourceLineNo">264</span>                     String name = pd.getName();<a name="line.264"></a>
+<span class="sourceLineNo">265</span>                     if (! normalProps.containsKey(name))<a name="line.265"></a>
+<span class="sourceLineNo">266</span>                        normalProps.put(name, new BeanPropertyMeta.Builder(beanMeta, name));<a name="line.266"></a>
+<span class="sourceLineNo">267</span>                     normalProps.get(name).setGetter(pd.getReadMethod()).setSetter(pd.getWriteMethod());<a name="line.267"></a>
+<span class="sourceLineNo">268</span>                  }<a name="line.268"></a>
+<span class="sourceLineNo">269</span>               }<a name="line.269"></a>
+<span class="sourceLineNo">270</span><a name="line.270"></a>
+<span class="sourceLineNo">271</span>            } else /* Use 'better' introspection */ {<a name="line.271"></a>
+<span class="sourceLineNo">272</span><a name="line.272"></a>
+<span class="sourceLineNo">273</span>               for (Field f : findBeanFields(c2, stopClass, fVis)) {<a name="line.273"></a>
+<span class="sourceLineNo">274</span>                  String name = findPropertyName(f, fixedBeanProps);<a name="line.274"></a>
+<span class="sourceLineNo">275</span>                  if (name != null) {<a name="line.275"></a>
+<span class="sourceLineNo">276</span>                     if (! normalProps.containsKey(name))<a name="line.276"></a>
+<span class="sourceLineNo">277</span>                        normalProps.put(name, new BeanPropertyMeta.Builder(beanMeta, name));<a name="line.277"></a>
+<span class="sourceLineNo">278</span>                     normalProps.get(name).setField(f);<a name="line.278"></a>
+<span class="sourceLineNo">279</span>                  }<a name="line.279"></a>
+<span class="sourceLineNo">280</span>               }<a name="line.280"></a>
+<span class="sourceLineNo">281</span><a name="line.281"></a>
+<span class="sourceLineNo">282</span>               List&lt;BeanMethod&gt; bms = findBeanMethods(c2, stopClass, mVis, fixedBeanProps, propertyNamer);<a name="line.282"></a>
+<span class="sourceLineNo">283</span><a name="line.283"></a>
+<span class="sourceLineNo">284</span>               // Iterate through all the getters.<a name="line.284"></a>
+<span class="sourceLineNo">285</span>               for (BeanMethod bm : bms) {<a name="line.285"></a>
+<span class="sourceLineNo">286</span>                  String pn = bm.propertyName;<a name="line.286"></a>
+<span class="sourceLineNo">287</span>                  Method m = bm.method;<a name="line.287"></a>
+<span class="sourceLineNo">288</span>                  if (! normalProps.containsKey(pn))<a name="line.288"></a>
+<span class="sourceLineNo">289</span>                     normalProps.put(pn, new BeanPropertyMeta.Builder(beanMeta, pn));<a name="line.289"></a>
+<span class="sourceLineNo">290</span>                  BeanPropertyMeta.Builder bpm = normalProps.get(pn);<a name="line.290"></a>
+<span class="sourceLineNo">291</span>                  if (! bm.isSetter)<a name="line.291"></a>
+<span class="sourceLineNo">292</span>                     bpm.setGetter(m);<a name="line.292"></a>
+<span class="sourceLineNo">293</span>               }<a name="line.293"></a>
+<span class="sourceLineNo">294</span><a name="line.294"></a>
+<span class="sourceLineNo">295</span>               // Now iterate through all the setters.<a name="line.295"></a>
+<span class="sourceLineNo">296</span>               for (BeanMethod bm : bms) {<a name="line.296"></a>
+<span class="sourceLineNo">297</span>                  if (bm.isSetter) {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>                     BeanPropertyMeta.Builder bpm = normalProps.get(bm.propertyName);<a name="line.298"></a>
+<span class="sourceLineNo">299</span>                     if (bm.matchesPropertyType(bpm))<a name="line.299"></a>
+<span class="sourceLineNo">300</span>                        bpm.setSetter(bm.method);<a name="line.300"></a>
+<span class="sourceLineNo">301</span>                  }<a name="line.301"></a>
+<span class="sourceLineNo">302</span>               }<a name="line.302"></a>
+<span class="sourceLineNo">303</span>            }<a name="line.303"></a>
+<span class="sourceLineNo">304</span><a name="line.304"></a>
+<span class="sourceLineNo">305</span>            typeVarImpls = new HashMap&lt;Class&lt;?&gt;,Class&lt;?&gt;[]&gt;();<a name="line.305"></a>
+<span class="sourceLineNo">306</span>            findTypeVarImpls(c, typeVarImpls);<a name="line.306"></a>
+<span class="sourceLineNo">307</span>            if (typeVarImpls.isEmpty())<a name="line.307"></a>
+<span class="sourceLineNo">308</span>               typeVarImpls = null;<a name="line.308"></a>
+<span class="sourceLineNo">309</span><a name="line.309"></a>
+<span class="sourceLineNo">310</span>            // Eliminate invalid properties, and set the contents of getterProps and setterProps.<a name="line.310"></a>
+<span class="sourceLineNo">311</span>            for (Iterator&lt;BeanPropertyMeta.Builder&gt; i = normalProps.values().iterator(); i.hasNext();) {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>               BeanPropertyMeta.Builder p = i.next();<a name="line.312"></a>
+<span class="sourceLineNo">313</span>               try {<a name="line.313"></a>
+<span class="sourceLineNo">314</span>                  if (p.validate(ctx, beanRegistry, typeVarImpls)) {<a name="line.314"></a>
 <span class="sourceLineNo">315</span><a name="line.315"></a>
-<span class="sourceLineNo">316</span>                     if (p.setter != null)<a name="line.316"></a>
-<span class="sourceLineNo">317</span>                        setterProps.put(p.setter, p.name);<a name="line.317"></a>
+<span class="sourceLineNo">316</span>                     if (p.getter != null)<a name="line.316"></a>
+<span class="sourceLineNo">317</span>                        getterProps.put(p.getter, p.name);<a name="line.317"></a>
 <span class="sourceLineNo">318</span><a name="line.318"></a>
-<span class="sourceLineNo">319</span>                  } else {<a name="line.319"></a>
-<span class="sourceLineNo">320</span>                     i.remove();<a name="line.320"></a>
-<span class="sourceLineNo">321</span>                  }<a name="line.321"></a>
-<span class="sourceLineNo">322</span>               } catch (ClassNotFoundException e) {<a name="line.322"></a>
-<span class="sourceLineNo">323</span>                  throw new BeanRuntimeException(c, e.getLocalizedMessage());<a name="line.323"></a>
-<span class="sourceLineNo">324</span>               }<a name="line.324"></a>
-<span class="sourceLineNo">325</span>            }<a name="line.325"></a>
-<span class="sourceLineNo">326</span><a name="line.326"></a>
-<span class="sourceLineNo">327</span>            // Check for missing properties.<a name="line.327"></a>
-<span class="sourceLineNo">328</span>            for (String fp : fixedBeanProps)<a name="line.328"></a>
-<span class="sourceLineNo">329</span>               if (! normalProps.containsKey(fp))<a name="line.329"></a>
-<span class="sourceLineNo">330</span>                  throw new BeanRuntimeException(c, "The property ''{0}'' was defined on the @Bean(properties=X) annotation but was not found on the class definition.", fp);<a name="line.330"></a>
-<span class="sourceLineNo">331</span><a name="line.331"></a>
-<span class="sourceLineNo">332</span>            // Mark constructor arg properties.<a name="line.332"></a>
-<span class="sourceLineNo">333</span>            for (String fp : constructorArgs) {<a name="line.333"></a>
-<span class="sourceLineNo">334</span>               BeanPropertyMeta.Builder m = normalProps.get(fp);<a name="line.334"></a>
-<span class="sourceLineNo">335</span>               if (m == null)<a name="line.335"></a>
-<span class="sourceLineNo">336</span>                  throw new BeanRuntimeException(c, "The property ''{0}'' was defined on the @BeanConstructor(properties=X) annotation but was not found on the class definition.", fp);<a name="line.336"></a>
-<span class="sourceLineNo">337</span>               m.setAsConstructorArg();<a name="line.337"></a>
-<span class="sourceLineNo">338</span>            }<a name="line.338"></a>
-<span class="sourceLineNo">339</span><a name="line.339"></a>
-<span class="sourceLineNo">340</span>            // Make sure at least one property was found.<a name="line.340"></a>
-<span class="sourceLineNo">341</span>            if (beanFilter == null &amp;&amp; ctx.beansRequireSomeProperties &amp;&amp; normalProps.size() == 0)<a name="line.341"></a>
-<span class="sourceLineNo">342</span>               return "No properties detected on bean class";<a name="line.342"></a>
-<span class="sourceLineNo">343</span><a name="line.343"></a>
-<span class="sourceLineNo">344</span>            boolean sortProperties = (ctx.sortProperties || (beanFilter != null &amp;&amp; beanFilter.isSortProperties())) &amp;&amp; fixedBeanProps.isEmpty();<a name="line.344"></a>
-<span class="sourceLineNo">345</span><a name="line.345"></a>
-<span class="sourceLineNo">346</span>            properties = sortProperties ? new TreeMap&lt;String,BeanPropertyMeta&gt;() : new LinkedHashMap&lt;String,BeanPropertyMeta&gt;();<a name="line.346"></a>
-<span class="sourceLineNo">347</span><a name="line.347"></a>
-<span class="sourceLineNo">348</span>            if (beanFilter != null &amp;&amp; beanFilter.getTypeName() != null)<a name="line.348"></a>
-<span class="sourceLineNo">349</span>               dictionaryName = beanFilter.getTypeName();<a name="line.349"></a>
-<span class="sourceLineNo">350</span>            if (dictionaryName == null)<a name="line.350"></a>
-<span class="sourceLineNo">351</span>               dictionaryName = findDictionaryName(this.classMeta);<a name="line.351"></a>
-<span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>            for (Map.Entry&lt;String,BeanPropertyMeta.Builder&gt; e : normalProps.entrySet()) {<a name="line.353"></a>
-<span class="sourceLineNo">354</span>               if ("*".equals(e.getValue().name))<a name="line.354"></a>
-<span class="sourceLineNo">355</span>                  extrasProperty = e.getValue().build();<a name="line.355"></a>
-<span class="sourceLineNo">356</span>               else<a name="line.356"></a>
-<span class="sourceLineNo">357</span>                  properties.put(e.getKey(), e.getValue().build());<a name="line.357"></a>
-<span class="sourceLineNo">358</span>            }<a name="line.358"></a>
-<span class="sourceLineNo">359</span><a name="line.359"></a>
-<span class="sourceLineNo">360</span>            // If a beanFilter is defined, look for inclusion and exclusion lists.<a name="line.360"></a>
-<span class="sourceLineNo">361</span>            if (beanFilter != null) {<a name="line.361"></a>
+<span class="sourceLineNo">319</span>                     if (p.setter != null)<a name="line.319"></a>
+<span class="sourceLineNo">320</span>                        setterProps.put(p.setter, p.name);<a name="line.320"></a>
+<span class="sourceLineNo">321</span><a name="line.321"></a>
+<span class="sourceLineNo">322</span>                  } else {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>                     i.remove();<a name="line.323"></a>
+<span class="sourceLineNo">324</span>                  }<a name="line.324"></a>
+<span class="sourceLineNo">325</span>               } catch (ClassNotFoundException e) {<a name="line.325"></a>
+<span class="sourceLineNo">326</span>                  throw new BeanRuntimeException(c, e.getLocalizedMessage());<a name="line.326"></a>
+<span class="sourceLineNo">327</span>               }<a name="line.327"></a>
+<span class="sourceLineNo">328</span>            }<a name="line.328"></a>
+<span class="sourceLineNo">329</span><a name="line.329"></a>
+<span class="sourceLineNo">330</span>            // Check for missing properties.<a name="line.330"></a>
+<span class="sourceLineNo">331</span>            for (String fp : fixedBeanProps)<a name="line.331"></a>
+<span class="sourceLineNo">332</span>               if (! normalProps.containsKey(fp))<a name="line.332"></a>
+<span class="sourceLineNo">333</span>                  throw new BeanRuntimeException(c, "The property ''{0}'' was defined on the @Bean(properties=X) annotation but was not found on the class definition.", fp);<a name="line.333"></a>
+<span class="sourceLineNo">334</span><a name="line.334"></a>
+<span class="sourceLineNo">335</span>            // Mark constructor arg properties.<a name="line.335"></a>
+<span class="sourceLineNo">336</span>            for (String fp : constructorArgs) {<a name="line.336"></a>
+<span class="sourceLineNo">337</span>               BeanPropertyMeta.Builder m = normalProps.get(fp);<a name="line.337"></a>
+<span class="sourceLineNo">338</span>               if (m == null)<a name="line.338"></a>
+<span class="sourceLineNo">339</span>                  throw new BeanRuntimeException(c, "The property ''{0}'' was defined on the @BeanConstructor(properties=X) annotation but was not found on the class definition.", fp);<a name="line.339"></a>
+<span class="sourceLineNo">340</span>               m.setAsConstructorArg();<a name="line.340"></a>
+<span class="sourceLineNo">341</span>            }<a name="line.341"></a>
+<span class="sourceLineNo">342</span><a name="line.342"></a>
+<span class="sourceLineNo">343</span>            // Make sure at least one property was found.<a name="line.343"></a>
+<span class="sourceLineNo">344</span>            if (beanFilter == null &amp;&amp; ctx.beansRequireSomeProperties &amp;&amp; normalProps.size() == 0)<a name="line.344"></a>
+<span class="sourceLineNo">345</span>               return "No properties detected on bean class";<a name="line.345"></a>
+<span class="sourceLineNo">346</span><a name="line.346"></a>
+<span class="sourceLineNo">347</span>            sortProperties = (ctx.sortProperties || (beanFilter != null &amp;&amp; beanFilter.isSortProperties())) &amp;&amp; fixedBeanProps.isEmpty();<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>            properties = sortProperties ? new TreeMap&lt;String,BeanPropertyMeta&gt;() : new LinkedHashMap&lt;String,BeanPropertyMeta&gt;();<a name="line.349"></a>
+<span class="sourceLineNo">350</span><a name="line.350"></a>
+<span class="sourceLineNo">351</span>            if (beanFilter != null &amp;&amp; beanFilter.getTypeName() != null)<a name="line.351"></a>
+<span class="sourceLineNo">352</span>               dictionaryName = beanFilter.getTypeName();<a name="line.352"></a>
+<span class="sourceLineNo">353</span>            if (dictionaryName == null)<a name="line.353"></a>
+<span class="sourceLineNo">354</span>               dictionaryName = findDictionaryName(this.classMeta);<a name="line.354"></a>
+<span class="sourceLineNo">355</span><a name="line.355"></a>
+<span class="sourceLineNo">356</span>            for (Map.Entry&lt;String,BeanPropertyMeta.Builder&gt; e : normalProps.entrySet()) {<a name="line.356"></a>
+<span class="sourceLineNo">357</span>               BeanPropertyMeta pMeta = e.getValue().build();<a name="line.357"></a>
+<span class="sourceLineNo">358</span>               if (pMeta.isDyna())<a name="line.358"></a>
+<span class="sourceLineNo">359</span>                  dynaProperty = pMeta;<a name="line.359"></a>
+<span class="sourceLineNo">360</span>               properties.put(e.getKey(), pMeta);<a name="line.360"></a>
+<span class="sourceLineNo">361</span>            }<a name="line.361"></a>
 <span class="sourceLineNo">362</span><a name="line.362"></a>
-<span class="sourceLineNo">363</span>               // Eliminated excluded properties if BeanFilter.excludeKeys is specified.<a name="line.363"></a>
-<span class="sourceLineNo">364</span>               String[] includeKeys = beanFilter.getProperties();<a name="line.364"></a>
-<span class="sourceLineNo">365</span>               String[] excludeKeys = beanFilter.getExcludeProperties();<a name="line.365"></a>
-<span class="sourceLineNo">366</span>               if (excludeKeys != null) {<a name="line.366"></a>
-<span class="sourceLineNo">367</span>                  for (String k : excludeKeys)<a name="line.367"></a>
-<span class="sourceLineNo">368</span>                     properties.remove(k);<a name="line.368"></a>
-<span class="sourceLineNo">369</span><a name="line.369"></a>
-<span class="sourceLineNo">370</span>               // Only include specified properties if BeanFilter.includeKeys is specified.<a name="line.370"></a>
-<span class="sourceLineNo">371</span>               // Note that the order must match includeKeys.<a name="line.371"></a>
-<span class="sourceLineNo">372</span>               } else if (includeKeys != null) {<a name="line.372"></a>
-<span class="sourceLineNo">373</span>                  Map&lt;String,BeanPropertyMeta&gt; properties2 = new LinkedHashMap&lt;String,BeanPropertyMeta&gt;();<a name="line.373"></a>
-<span class="sourceLineNo">374</span>                  for (String k : includeKeys) {<a name="line.374"></a>
-<span class="sourceLineNo">375</span>                     if (properties.containsKey(k))<a name="line.375"></a>
-<span class="sourceLineNo">376</span>                        properties2.put(k, properties.get(k));<a name="line.376"></a>
-<span class="sourceLineNo">377</span>                  }<a name="line.377"></a>
-<span class="sourceLineNo">378</span>                  properties = properties2;<a name="line.378"></a>
-<span class="sourceLineNo">379</span>               }<a name="line.379"></a>
-<span class="sourceLineNo">380</span>            }<a name="line.380"></a>
-<span class="sourceLineNo">381</span><a name="line.381"></a>
-<span class="sourceLineNo">382</span>            if (pNames != null) {<a name="line.382"></a>
-<span class="sourceLineNo">383</span>               Map&lt;String,BeanPropertyMeta&gt; properties2 = new LinkedHashMap&lt;String,BeanPropertyMeta&gt;();<a name="line.383"></a>
-<span class="sourceLineNo">384</span>               for (String k : pNames) {<a name="line.384"></a>
-<span class="sourceLineNo">385</span>                  if (properties.containsKey(k))<a name="line.385"></a>
-<span class="sourceLineNo">386</span>                     properties2.put(k, properties.get(k));<a name="line.386"></a>
-<span class="sourceLineNo">387</span>               }<a name="line.387"></a>
-<span class="sourceLineNo">388</span>               properties = properties2;<a name="line.388"></a>
-<span class="sourceLineNo">389</span>            }<a name="line.389"></a>
-<span class="sourceLineNo">390</span><a name="line.390"></a>
-<span class="sourceLineNo">391</span>         } catch (BeanRuntimeException e) {<a name="line.391"></a>
-<span class="sourceLineNo">392</span>            throw e;<a name="line.392"></a>
-<span class="sourceLineNo">393</span>         } catch (Exception e) {<a name="line.393"></a>
-<span class="sourceLineNo">394</span>            return "Exception:  " + StringUtils.getStackTrace(e);<a name="line.394"></a>
-<span class="sourceLineNo">395</span>         }<a name="line.395"></a>
-<span class="sourceLineNo">396</span><a name="line.396"></a>
-<span class="sourceLineNo">397</span>         return null;<a name="line.397"></a>
-<span class="sourceLineNo">398</span>      }<a name="line.398"></a>
+<span class="sourceLineNo">363</span>            // If a beanFilter is defined, look for inclusion and exclusion lists.<a name="line.363"></a>
+<span class="sourceLineNo">364</span>            if (beanFilter != null) {<a name="line.364"></a>
+<span class="sourceLineNo">365</span><a name="line.365"></a>
+<span class="sourceLineNo">366</span>               // Eliminated excluded properties if BeanFilter.excludeKeys is specified.<a name="line.366"></a>
+<span class="sourceLineNo">367</span>               String[] includeKeys = beanFilter.getProperties();<a name="line.367"></a>
+<span class="sourceLineNo">368</span>               String[] excludeKeys = beanFilter.getExcludeProperties();<a name="line.368"></a>
+<span class="sourceLineNo">369</span>               if (excludeKeys != null) {<a name="line.369"></a>
+<span class="sourceLineNo">370</span>                  for (String k : excludeKeys)<a name="line.370"></a>
+<span class="sourceLineNo">371</span>                     properties.remove(k);<a name="line.371"></a>
+<span class="sourceLineNo">372</span><a name="line.372"></a>
+<span class="sourceLineNo">373</span>               // Only include specified properties if BeanFilter.includeKeys is specified.<a name="line.373"></a>
+<span class="sourceLineNo">374</span>               // Note that the order must match includeKeys.<a name="line.374"></a>
+<span class="sourceLineNo">375</span>               } else if (includeKeys != null) {<a name="line.375"></a>
+<span class="sourceLineNo">376</span>                  Map&lt;String,BeanPropertyMeta&gt; properties2 = new LinkedHashMap&lt;String,BeanPropertyMeta&gt;();<a name="line.376"></a>
+<span class="sourceLineNo">377</span>                  for (String k : includeKeys) {<a name="line.377"></a>
+<span class="sourceLineNo">378</span>                     if (properties.containsKey(k))<a name="line.378"></a>
+<span class="sourceLineNo">379</span>                        properties2.put(k, properties.get(k));<a name="line.379"></a>
+<span class="sourceLineNo">380</span>                  }<a name="line.380"></a>
+<span class="sourceLineNo">381</span>                  properties = properties2;<a name="line.381"></a>
+<span class="sourceLineNo">382</span>               }<a name="line.382"></a>
+<span class="sourceLineNo">383</span>            }<a name="line.383"></a>
+<span class="sourceLineNo">384</span><a name="line.384"></a>
+<span class="sourceLineNo">385</span>            if (pNames != null) {<a name="line.385"></a>
+<span class="sourceLineNo">386</span>               Map&lt;String,BeanPropertyMeta&gt; properties2 = new LinkedHashMap&lt;String,BeanPropertyMeta&gt;();<a name="line.386"></a>
+<span class="sourceLineNo">387</span>               for (String k : pNames) {<a name="line.387"></a>
+<span class="sourceLineNo">388</span>                  if (properties.containsKey(k))<a name="line.388"></a>
+<span class="sourceLineNo">389</span>                     properties2.put(k, properties.get(k));<a name="line.389"></a>
+<span class="sourceLineNo">390</span>               }<a name="line.390"></a>
+<span class="sourceLineNo">391</span>               properties = properties2;<a name="line.391"></a>
+<span class="sourceLineNo">392</span>            }<a name="line.392"></a>
+<span class="sourceLineNo">393</span><a name="line.393"></a>
+<span class="sourceLineNo">394</span>         } catch (BeanRuntimeException e) {<a name="line.394"></a>
+<span class="sourceLineNo">395</span>            throw e;<a name="line.395"></a>
+<span class="sourceLineNo">396</span>         } catch (Exception e) {<a name="line.396"></a>
+<span class="sourceLineNo">397</span>            return "Exception:  " + StringUtils.getStackTrace(e);<a name="line.397"></a>
+<span class="sourceLineNo">398</span>         }<a name="line.398"></a>
 <span class="sourceLineNo">399</span><a name="line.399"></a>
-<span class="sourceLineNo">400</span>      private String findDictionaryName(ClassMeta&lt;?&gt; cm) {<a name="line.400"></a>
-<span class="sourceLineNo">401</span>         BeanRegistry br = cm.getBeanRegistry();<a name="line.401"></a>
-<span class="sourceLineNo">402</span>         if (br != null) {<a name="line.402"></a>
-<span class="sourceLineNo">403</span>            String s = br.getTypeName(this.classMeta);<a name="line.403"></a>
-<span class="sourceLineNo">404</span>            if (s != null)<a name="line.404"></a>
-<span class="sourceLineNo">405</span>               return s;<a name="line.405"></a>
-<span class="sourceLineNo">406</span>         }<a name="line.406"></a>
-<span class="sourceLineNo">407</span>         Class&lt;?&gt; pcm = cm.innerClass.getSuperclass();<a name="line.407"></a>
-<span class="sourceLineNo">408</span>         if (pcm != null) {<a name="line.408"></a>
-<span class="sourceLineNo">409</span>            String s = findDictionaryName(ctx.getClassMeta(pcm));<a name="line.409"></a>
-<span class="sourceLineNo">410</span>            if (s != null)<a name="line.410"></a>
-<span class="sourceLineNo">411</span>               return s;<a name="line.411"></a>
-<span class="sourceLineNo">412</span>         }<a name="line.412"></a>
-<span class="sourceLineNo">413</span>         for (Class&lt;?&gt; icm : cm.innerClass.getInterfaces()) {<a name="line.413"></a>
-<span class="sourceLineNo">414</span>            String s = findDictionaryName(ctx.getClassMeta(icm));<a name="line.414"></a>
-<span class="sourceLineNo">415</span>            if (s != null)<a name="line.415"></a>
-<span class="sourceLineNo">416</span>               return s;<a name="line.416"></a>
-<span class="sourceLineNo">417</span>         }<a name="line.417"></a>
-<span class="sourceLineNo">418</span>         return null;<a name="line.418"></a>
-<span class="sourceLineNo">419</span>      }<a name="line.419"></a>
-<span class="sourceLineNo">420</span><a name="line.420"></a>
-<span class="sourceLineNo">421</span>      /*<a name="line.421"></a>
-<span class="sourceLineNo">422</span>       * Returns the property name of the specified field if it's a valid property.<a name="line.422"></a>
-<span class="sourceLineNo">423</span>       * Returns null if the field isn't a valid property.<a name="line.423"></a>
-<span class="sourceLineNo">424</span>       */<a name="line.424"></a>
-<span class="sourceLineNo">425</span>      private String findPropertyName(Field f, Set&lt;String&gt; fixedBeanProps) {<a name="line.425"></a>
-<span class="sourceLineNo">426</span>         BeanProperty bp = f.getAnnotation(BeanProperty.class);<a name="line.426"></a>
-<span class="sourceLineNo">427</span>         if (bp != null &amp;&amp; ! bp.name().equals("")) {<a name="line.427"></a>
-<span class="sourceLineNo">428</span>            String name = bp.name();<a name="line.428"></a>
-<span class="sourceLineNo">429</span>            if (fixedBeanProps.isEmpty() || fixedBeanProps.contains(name))<a name="line.429"></a>
-<span class="sourceLineNo">430</span>               return name;<a name="line.430"></a>
-<span class="sourceLineNo">431</span>            throw new BeanRuntimeException(classMeta.getInnerClass(), "Method property ''{0}'' identified in @BeanProperty, but missing from @Bean", name);<a name="line.431"></a>
-<span class="sourceLineNo">432</span>         }<a name="line.432"></a>
-<span class="sourceLineNo">433</span>         String name = propertyNamer.getPropertyName(f.getName());<a name="line.433"></a>
-<span class="sourceLineNo">434</span>         if (fixedBeanProps.isEmpty() || fixedBeanProps.contains(name))<a name="line.434"></a>
-<span class="sourceLineNo">435</span>            return name;<a name="line.435"></a>
-<span class="sourceLineNo">436</span>         return null;<a name="line.436"></a>
-<span class="sourceLineNo">437</span>      }<a name="line.437"></a>
-<span class="sourceLineNo">438</span>   }<a name="line.438"></a>
-<span class="sourceLineNo">439</span><a name="line.439"></a>
-<span class="sourceLineNo">440</span>   /**<a name="line.440"></a>
-<span class="sourceLineNo">441</span>    * Returns the {@link ClassMeta} of this bean.<a name="line.441"></a>
-<span class="sourceLineNo">442</span>    *<a name="line.442"></a>
-<span class="sourceLineNo">443</span>    * @return The {@link ClassMeta} of this bean.<a name="line.443"></a>
-<span class="sourceLineNo">444</span>    */<a name="line.444"></a>
-<span class="sourceLineNo">445</span>   @BeanIgnore<a name="line.445"></a>
-<span class="sourceLineNo">446</span>   public ClassMeta&lt;T&gt; getClassMeta() {<a name="line.446"></a>
-<span class="sourceLineNo">447</span>      return classMeta;<a name="line.447"></a>
-<span class="sourceLineNo">448</span>   }<a name="line.448"></a>
-<span class="sourceLineNo">449</span><a name="line.449"></a>
-<span class="sourceLineNo">450</span>   /**<a name="line.450"></a>
-<span class="sourceLineNo">451</span>    * Returns the dictionary name for this bean as defined through the {@link Bean#typeName()} annotation.<a name="line.451"></a>
-<span class="sourceLineNo">452</span>    *<a name="line.452"></a>
-<span class="sourceLineNo">453</span>    * @return The dictioanry name for this bean, or &lt;jk&gt;null&lt;/jk&gt; if it has no dictionary name defined.<a name="line.453"></a>
-<span class="sourceLineNo">454</span>    */<a name="line.454"></a>
-<span class="sourceLineNo">455</span>   public String getDictionaryName() {<a name="line.455"></a>
-<span class="sourceLineNo">456</span>      return dictionaryName;<a name="line.456"></a>
-<span class="sourceLineNo">457</span>   }<a name="line.457"></a>
-<span class="sourceLineNo">458</span><a name="line.458"></a>
-<span class="sourceLineNo">459</span>   /**<a name="line.459"></a>
-<span class="sourceLineNo">460</span>    * Returns a mock bean property that resolves to the name &lt;js&gt;"_type"&lt;/js&gt; and whose value always resolves<a name="line.460"></a>
-<span class="sourceLineNo">461</span>    *    to the dictionary name of the bean.<a name="line.461"></a>
-<span class="sourceLineNo">462</span>    *<a name="line.462"></a>
-<span class="sourceLineNo">463</span>    * @return The type name property.<a name="line.463"></a>
-<span class="sourceLineNo">464</span>    */<a name="line.464"></a>
-<span class="sourceLineNo">465</span>   public BeanPropertyMeta getTypeProperty() {<a name="line.465"></a>
-<span class="sourceLineNo">466</span>      return typeProperty;<a name="line.466"></a>
-<span class="sourceLineNo">467</span>   }<a name="line.467"></a>
-<span class="sourceLineNo">468</span><a name="line.468"></a>
-<span class="sourceLineNo">469</span>   /*<a name="line.469"></a>
-<span class="sourceLineNo">470</span>    * Temporary getter/setter method struct.<a name="line.470"></a>
-<span class="sourceLineNo">471</span>    */<a name="line.471"></a>
-<span class="sourceLineNo">472</span>   private static class BeanMethod {<a name="line.472"></a>
-<span class="sourceLineNo">473</span>      String propertyName;<a name="line.473"></a>
-<span class="sourceLineNo">474</span>      boolean isSetter;<a name="line.474"></a>
-<span class="sourceLineNo">475</span>      Method method;<a name="line.475"></a>
-<span class="sourceLineNo">476</span>      Class&lt;?&gt; type;<a name="line.476"></a>
-<span class="sourceLineNo">477</span><a name="line.477"></a>
-<span class="sourceLineNo">478</span>      BeanMethod(String propertyName, boolean isSetter, Method method) {<a name="line.478"></a>
-<span class="sourceLineNo">479</span>         this.propertyName = propertyName;<a name="line.479"></a>
-<span class="sourceLineNo">480</span>         this.isSetter = isSetter;<a name="line.480"></a>
-<span class="sourceLineNo">481</span>         this.method = method;<a name="line.481"></a>
-<span class="sourceLineNo">482</span>         if (isSetter)<a name="line.482"></a>
-<span class="sourceLineNo">483</span>            this.type = method.getParameterTypes()[0];<a name="line.483"></a>
-<span class="sourceLineNo">484</span>         else<a name="line.484"></a>
-<span class="sourceLineNo">485</span>            this.type = method.getReturnType();<a name="line.485"></a>
-<span class="sourceLineNo">486</span>      }<a name="line.486"></a>
-<span class="sourceLineNo">487</span><a name="line.487"></a>
-<span class="sourceLineNo">488</span>      /*<a name="line.488"></a>
-<span class="sourceLineNo">489</span>       * Returns true if this method matches the class type of the specified property.<a name="line.489"></a>
-<span class="sourceLineNo">490</span>       * Only meant to be used for setters.<a name="line.490"></a>
-<span class="sourceLineNo">491</span>       */<a name="line.491"></a>
-<span class="sourceLineNo">492</span>      boolean matchesPropertyType(BeanPropertyMeta.Builder b) {<a name="line.492"></a>
-<span class="sourceLineNo">493</span>         if (b == null)<a name="line.493"></a>
-<span class="sourceLineNo">494</span>            return false;<a name="line.494"></a>
-<span class="sourceLineNo">495</span><a name="line.495"></a>
-<span class="sourceLineNo">496</span>         // Get the bean property type from the getter/field.<a name="line.496"></a>
-<span class="sourceLineNo">497</span>         Class&lt;?&gt; pt = null;<a name="line.497"></a>
-<span class="sourceLineNo">498</span>         if (b.getter != null)<a name="line.498"></a>
-<span class="sourceLineNo">499</span>            pt = b.getter.getReturnType();<a name="line.499"></a>
-<span class="sourceLineNo">500</span>         else if (b.field != null)<a name="line.500"></a>
-<span class="sourceLineNo">501</span>            pt = b.field.getType();<a name="line.501"></a>
+<span class="sourceLineNo">400</span>         return null;<a name="line.400"></a>
+<span class="sourceLineNo">401</span>      }<a name="line.401"></a>
+<span class="sourceLineNo">402</span><a name="line.402"></a>
+<span class="sourceLineNo">403</span>      private String findDictionaryName(ClassMeta&lt;?&gt; cm) {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>         BeanRegistry br = cm.getBeanRegistry();<a name="line.404"></a>
+<span class="sourceLineNo">405</span>         if (br != null) {<a name="line.405"></a>
+<span class="sourceLineNo">406</span>            String s = br.getTypeName(this.classMeta);<a name="line.406"></a>
+<span class="sourceLineNo">407</span>            if (s != null)<a name="line.407"></a>
+<span class="sourceLineNo">408</span>               return s;<a name="line.408"></a>
+<span class="sourceLineNo">409</span>         }<a name="line.409"></a>
+<span class="sourceLineNo">410</span>         Class&lt;?&gt; pcm = cm.innerClass.getSuperclass();<a name="line.410"></a>
+<span class="sourceLineNo">411</span>         if (pcm != null) {<a name="line.411"></a>
+<span class="sourceLineNo">412</span>            String s = findDictionaryName(ctx.getClassMeta(pcm));<a name="line.412"></a>
+<span class="sourceLineNo">413</span>            if (s != null)<a name="line.413"></a>
+<span class="sourceLineNo">414</span>               return s;<a name="line.414"></a>
+<span class="sourceLineNo">415</span>         }<a name="line.415"></a>
+<span class="sourceLineNo">416</span>         for (Class&lt;?&gt; icm : cm.innerClass.getInterfaces()) {<a name="line.416"></a>
+<span class="sourceLineNo">417</span>            String s = findDictionaryName(ctx.getClassMeta(icm));<a name="line.417"></a>
+<span class="sourceLineNo">418</span>            if (s != null)<a name="line.418"></a>
+<span class="sourceLineNo">419</span>               return s;<a name="line.419"></a>
+<span class="sourceLineNo">420</span>         }<a name="line.420"></a>
+<span class="sourceLineNo">421</span>         return null;<a name="line.421"></a>
+<span class="sourceLineNo">422</span>      }<a name="line.422"></a>
+<span class="sourceLineNo">423</span><a name="line.423"></a>
+<span class="sourceLineNo">424</span>      /*<a name="line.424"></a>
+<span class="sourceLineNo">425</span>       * Returns the property name of the specified field if it's a valid property.<a name="line.425"></a>
+<span class="sourceLineNo">426</span>       * Returns null if the field isn't a valid property.<a name="line.426"></a>
+<span class="sourceLineNo">427</span>       */<a name="line.427"></a>
+<span class="sourceLineNo">428</span>      private String findPropertyName(Field f, Set&lt;String&gt; fixedBeanProps) {<a name="line.428"></a>
+<span class="sourceLineNo">429</span>         BeanProperty bp = f.getAnnotation(BeanProperty.class);<a name="line.429"></a>
+<span class="sourceLineNo">430</span>         if (bp != null &amp;&amp; ! bp.name().equals("")) {<a name="line.430"></a>
+<span class="sourceLineNo">431</span>            String name = bp.name();<a name="line.431"></a>
+<span class="sourceLineNo">432</span>            if (fixedBeanProps.isEmpty() || fixedBeanProps.contains(name))<a name="line.432"></a>
+<span class="sourceLineNo">433</span>               return name;<a name="line.433"></a>
+<span class="sourceLineNo">434</span>            throw new BeanRuntimeException(classMeta.getInnerClass(), "Method property ''{0}'' identified in @BeanProperty, but missing from @Bean", name);<a name="line.434"></a>
+<span class="sourceLineNo">435</span>         }<a name="line.435"></a>
+<span class="sourceLineNo">436</span>         String name = propertyNamer.getPropertyName(f.getName());<a name="line.436"></a>
+<span class="sourceLineNo">437</span>         if (fixedBeanProps.isEmpty() || fixedBeanProps.contains(name))<a name="line.437"></a>
+<span class="sourceLineNo">438</span>            return name;<a name="line.438"></a>
+<span class="sourceLineNo">439</span>         return null;<a name="line.439"></a>
+<span class="sourceLineNo">440</span>      }<a name="line.440"></a>
+<span class="sourceLineNo">441</span>   }<a name="line.441"></a>
+<span class="sourceLineNo">442</span><a name="line.442"></a>
+<span class="sourceLineNo">443</span>   /**<a name="line.443"></a>
+<span class="sourceLineNo">444</span>    * Returns the {@link ClassMeta} of this bean.<a name="line.444"></a>
+<span class="sourceLineNo">445</span>    *<a name="line.445"></a>
+<span class="sourceLineNo">446</span>    * @return The {@link ClassMeta} of this bean.<a name="line.446"></a>
+<span class="sourceLineNo">447</span>    */<a name="line.447"></a>
+<span class="sourceLineNo">448</span>   @BeanIgnore<a name="line.448"></a>
+<span class="sourceLineNo">449</span>   public ClassMeta&lt;T&gt; getClassMeta() {<a name="line.449"></a>
+<span class="sourceLineNo">450</span>      return classMeta;<a name="line.450"></a>
+<span class="sourceLineNo">451</span>   }<a name="line.451"></a>
+<span class="sourceLineNo">452</span><a name="line.452"></a>
+<span class="sourceLineNo">453</span>   /**<a name="line.453"></a>
+<span class="sourceLineNo">454</span>    * Returns the dictionary name for this bean as defined through the {@link Bean#typeName()} annotation.<a name="line.454"></a>
+<span class="sourceLineNo">455</span>    *<a name="line.455"></a>
+<span class="sourceLineNo">456</span>    * @return The dictioanry name for this bean, or &lt;jk&gt;null&lt;/jk&gt; if it has no dictionary name defined.<a name="line.456"></a>
+<span class="sourceLineNo">457</span>    */<a name="line.457"></a>
+<span class="sourceLineNo">458</span>   public String getDictionaryName() {<a name="line.458"></a>
+<span class="sourceLineNo">459</span>      return dictionaryName;<a name="line.459"></a>
+<span class="sourceLineNo">460</span>   }<a name="line.460"></a>
+<span class="sourceLineNo">461</span><a name="line.461"></a>
+<span class="sourceLineNo">462</span>   /**<a name="line.462"></a>
+<span class="sourceLineNo">463</span>    * Returns a mock bean property that resolves to the name &lt;js&gt;"_type"&lt;/js&gt; and whose value always resolves<a name="line.463"></a>
+<span class="sourceLineNo">464</span>    *    to the dictionary name of the bean.<a name="line.464"></a>
+<span class="sourceLineNo">465</span>    *<a name="line.465"></a>
+<span class="sourceLineNo">466</span>    * @return The type name property.<a name="line.466"></a>
+<span class="sourceLineNo">467</span>    */<a name="line.467"></a>
+<span class="sourceLineNo">468</span>   public BeanPropertyMeta getTypeProperty() {<a name="line.468"></a>
+<span class="sourceLineNo">469</span>      return typeProperty;<a name="line.469"></a>
+<span class="sourceLineNo">470</span>   }<a name="line.470"></a>
+<span class="sourceLineNo">471</span><a name="line.471"></a>
+<span class="sourceLineNo">472</span>   /*<a name="line.472"></a>
+<span class="sourceLineNo">473</span>    * Temporary getter/setter method struct.<a name="line.473"></a>
+<span class="sourceLineNo">474</span>    */<a name="line.474"></a>
+<span class="sourceLineNo">475</span>   private static class BeanMethod {<a name="line.475"></a>
+<span class="sourceLineNo">476</span>      String propertyName;<a name="line.476"></a>
+<span class="sourceLineNo">477</span>      boolean isSetter;<a name="line.477"></a>
+<span class="sourceLineNo">478</span>      Method method;<a name="line.478"></a>
+<span class="sourceLineNo">479</span>      Class&lt;?&gt; type;<a name="line.479"></a>
+<span class="sourceLineNo">480</span><a name="line.480"></a>
+<span class="sourceLineNo">481</span>      BeanMethod(String propertyName, boolean isSetter, Method method) {<a name="line.481"></a>
+<span class="sourceLineNo">482</span>         this.propertyName = propertyName;<a name="line.482"></a>
+<span class="sourceLineNo">483</span>         this.isSetter = isSetter;<a name="line.483"></a>
+<span class="sourceLineNo">484</span>         this.method = method;<a name="line.484"></a>
+<span class="sourceLineNo">485</span>         if (isSetter)<a name="line.485"></a>
+<span class="sourceLineNo">486</span>            this.type = method.getParameterTypes()[0];<a name="line.486"></a>
+<span class="sourceLineNo">487</span>         else<a name="line.487"></a>
+<span class="sourceLineNo">488</span>            this.type = method.getReturnType();<a name="line.488"></a>
+<span class="sourceLineNo">489</span>      }<a name="line.489"></a>
+<span class="sourceLineNo">490</span><a name="line.490"></a>
+<span class="sourceLineNo">491</span>      /*<a name="line.491"></a>
+<span class="sourceLineNo">492</span>       * Returns true if this method matches the class type of the specified property.<a name="line.492"></a>
+<span class="sourceLineNo">493</span>       * Only meant to be used for setters.<a name="line.493"></a>
+<span class="sourceLineNo">494</span>       */<a name="line.494"></a>
+<span class="sourceLineNo">495</span>      boolean matchesPropertyType(BeanPropertyMeta.Builder b) {<a name="line.495"></a>
+<span class="sourceLineNo">496</span>         if (b == null)<a name="line.496"></a>
+<span class="sourceLineNo">497</span>            return false;<a name="line.497"></a>
+<span class="sourceLineNo">498</span><a name="line.498"></a>
+<span class="sourceLineNo">499</span>         // Don't do further validation if this is the "*" bean property.<a name="line.499"></a>
+<span class="sourceLineNo">500</span>         if ("*".equals(b.name))<a name="line.500"></a>
+<span class="sourceLineNo">501</span>            return true;<a name="line.501"></a>
 <span class="sourceLineNo">502</span><a name="line.502"></a>
-<span class="sourceLineNo">503</span>         // Doesn't match if no getter/field defined.<a name="line.503"></a>
-<span class="sourceLineNo">504</span>         if (pt == null)<a name="line.504"></a>
-<span class="sourceLineNo">505</span>            return false;<a name="line.505"></a>
-<span class="sourceLineNo">506</span><a name="line.506"></a>
-<span class="sourceLineNo">507</span>         // Doesn't match if not same type or super type as getter/field.<a name="line.507"></a>
-<span class="sourceLineNo">508</span>         if (! isParentClass(type, pt))<a name="line.508"></a>
-<span class="sourceLineNo">509</span>            return false;<a name="line.509"></a>
-<span class="sourceLineNo">510</span><a name="line.510"></a>
-<span class="sourceLineNo">511</span>         // If a setter was previously set, only use this setter if it's a closer<a name="line.511"></a>
-<span class="sourceLineNo">512</span>         // match (e.g. prev type is a superclass of this type).<a name="line.512"></a>
-<span class="sourceLineNo">513</span>         if (b.setter == null)<a name="line.513"></a>
-<span class="sourceLineNo">514</span>            return true;<a name="line.514"></a>
-<span class="sourceLineNo">515</span><a name="line.515"></a>
-<span class="sourceLineNo">516</span>         Class&lt;?&gt; prevType = b.setter.getParameterTypes()[0];<a name="line.516"></a>
-<span class="sourceLineNo">517</span>         return isParentClass(prevType, type, true);<a name="line.517"></a>
-<span class="sourceLineNo">518</span>      }<a name="line.518"></a>
-<span class="sourceLineNo">519</span><a name="line.519"></a>
-<span class="sourceLineNo">520</span>      @Override /* Object */<a name="line.520"></a>
-<span class="sourceLineNo">521</span>      public String toString() {<a name="line.521"></a>
-<span class="sourceLineNo">522</span>         return method.toString();<a name="line.522"></a>
-<span class="sourceLineNo">523</span>      }<a name="line.523"></a>
-<span class="sourceLineNo">524</span>   }<a name="line.524"></a>
-<span class="sourceLineNo">525</span><a name="line.525"></a>
-<span class="sourceLineNo">526</span>   /*<a name="line.526"></a>
-<span class="sourceLineNo">527</span>    * Find all the bean methods on this class.<a name="line.527"></a>
-<span class="sourceLineNo">528</span>    *<a name="line.528"></a>
-<span class="sourceLineNo">529</span>    * @param c The transformed class.<a name="line.529"></a>
-<span class="sourceLineNo">530</span>    * @param stopClass Don't look above this class in the hierarchy.<a name="line.530"></a>
-<span class="sourceLineNo">531</span>    * @param v The minimum method visibility.<a name="line.531"></a>
-<span class="sourceLineNo">532</span>    * @param fixedBeanProps Only include methods whose properties are in this list.<a name="line.532"></a>
-<span class="sourceLineNo">533</span>    * @param pn Use this property namer to determine property names from the method names.<a name="line.533"></a>
-<span class="sourceLineNo">534</span>    */<a name="line.534"></a>
-<span class="sourceLineNo">535</span>   private static List&lt;BeanMethod&gt; findBeanMethods(Class&lt;?&gt; c, Class&lt;?&gt; stopClass, Visibility v, Set&lt;String&gt; fixedBeanProps, PropertyNamer pn) {<a name="line.535"></a>
-<span class="sourceLineNo">536</span>      List&lt;BeanMethod&gt; l = new LinkedList&lt;BeanMethod&gt;();<a name="line.536"></a>
-<span 

<TRUNCATED>


Mime
View raw message