JavaField field2 = new JavaField(boolean.class, field.getName() + "Set", "false");
field2.addModifier(JavaModifier.PRIVATE);
if (propertyBean.isTransient()) {
field2.addModifier(JavaModifier.TRANSIENT);
}
JavaMethod accessor = getAccessor(configuration, propertyBean, field);
MethodBody accessorMethodBody;
try {
if (propertyBean.isEl()) {
accessorMethodBody = new PrimitiveELPropertyAccessorMethodBody(configuration, field, field2, propertyBean);
} else {
accessorMethodBody = new PrimitivePropertyAccessorMethodBody(configuration, field, field2);
}
accessor.setMethodBody(accessorMethodBody);
} catch (GeneratorException e) {
e.printStackTrace();
}
JavaMethod mutator = getMutator(configuration, propertyBean, field);
try {
PrimitivePropertyMutatorMethodBody mutatorBody = new PrimitivePropertyMutatorMethodBody(configuration, field, field2);
mutator.setMethodBody(mutatorBody);
} catch (GeneratorException e) {
e.printStackTrace();
}
javaClass.addField(field);