{
public void transform(ClassTransformation transformation, MutableComponentModel model)
{
for (String fieldName : transformation.findAllFieldsWithAnnotation(Property.class))
{
Property annotation = transformation.getFieldAnnotation(fieldName, Property.class);
String propertyName = InternalUtils.capitalize(InternalUtils.stripMemberPrefix(fieldName));
String fieldType = transformation.getFieldType(fieldName);
if (annotation.read())
{
TransformMethodSignature getter
= new TransformMethodSignature(Modifier.PUBLIC | Modifier.FINAL, fieldType,
"get" + propertyName,
null, null);
transformation.addTransformedMethod(getter, "return " + fieldName + ";");
}
if (annotation.write())
{
TransformMethodSignature setter
= new TransformMethodSignature(Modifier.PUBLIC | Modifier.FINAL, "void", "set" + propertyName,
new String[] { fieldType }, null);