@@ -68,8 +68,7 @@ public BeanBuilder implement(boolean failOnUnrecognized)
68
68
// First: find all supertypes:
69
69
implTypes .add (_type );
70
70
BeanUtil .findSuperTypes (_type , Object .class , implTypes );
71
- final boolean hasConcrete = !_type .isInterface ();
72
-
71
+
73
72
for (JavaType impl : implTypes ) {
74
73
TypeResolutionContext ctxt = buildTypeContext (impl );
75
74
@@ -107,7 +106,7 @@ public BeanBuilder implement(boolean failOnUnrecognized)
107
106
continue ;
108
107
}
109
108
// [module-mrbean#11]: try to support overloaded methods
110
- if (hasConcrete && hasConcreteOverride (m , _type )) {
109
+ if (hasConcreteOverride (m , _type )) {
111
110
continue ;
112
111
}
113
112
if (failOnUnrecognized ) {
@@ -117,14 +116,13 @@ public BeanBuilder implement(boolean failOnUnrecognized)
117
116
_unsupportedMethods .put (methodName , m );
118
117
}
119
118
}
120
-
121
119
return this ;
122
120
}
123
121
124
122
/**
125
123
* Method that generates byte code for class that implements abstract
126
124
* types requested so far.
127
- *
125
+ *
128
126
* @param className Fully-qualified name of the class to generate
129
127
* @return Byte code Class instance built by this builder
130
128
*/
@@ -176,7 +174,7 @@ public byte[] build(String className)
176
174
/**
177
175
* Helper method used to detect if an abstract method found in a base class
178
176
* may actually be implemented in a (more) concrete sub-class.
179
- *
177
+ *
180
178
* @since 2.4
181
179
*/
182
180
protected boolean hasConcreteOverride (Method m0 , JavaType implementedType )
@@ -196,7 +194,7 @@ protected boolean hasConcreteOverride(Method m0, JavaType implementedType)
196
194
}
197
195
return false ;
198
196
}
199
-
197
+
200
198
protected String getPropertyName (String methodName )
201
199
{
202
200
int prefixLen = methodName .startsWith ("is" ) ? 2 : 3 ;
@@ -220,7 +218,7 @@ protected void addGetter(TypeResolutionContext ctxt, Method m)
220
218
POJOProperty prop = findProperty (ctxt , getPropertyName (m .getName ()));
221
219
// only set if not yet set; we start with super class:
222
220
if (prop .getGetter () == null ) {
223
- prop .setGetter (m );
221
+ prop .setGetter (m );
224
222
}
225
223
}
226
224
@@ -241,7 +239,7 @@ protected POJOProperty findProperty(TypeResolutionContext ctxt, String propName)
241
239
}
242
240
return prop ;
243
241
}
244
-
242
+
245
243
protected final static boolean returnsBoolean (Method m )
246
244
{
247
245
Class <?> rt = m .getReturnType ();
0 commit comments