Skip to content

Commit

Permalink
[playframework#822] Adding synthetic markers to methods created by pr…
Browse files Browse the repository at this point in the history
…operty enhancer
  • Loading branch information
spinscale committed May 11, 2011
1 parent 161bce9 commit 892503c
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -83,6 +83,7 @@ public void enhanceThisClass(ApplicationClass applicationClass) throws Exception
// Créé le getter
String code = "public " + ctField.getType().getName() + " " + getter + "() { return this." + ctField.getName() + "; }";
CtMethod getMethod = CtMethod.make(code, ctClass);
getMethod.setModifiers(getMethod.getModifiers() | AccessFlag.SYNTHETIC);
ctClass.addMethod(getMethod);
}

Expand All @@ -94,6 +95,7 @@ public void enhanceThisClass(ApplicationClass applicationClass) throws Exception
} catch (NotFoundException noSetter) {
// Créé le setter
CtMethod setMethod = CtMethod.make("public void " + setter + "(" + ctField.getType().getName() + " value) { this." + ctField.getName() + " = value; }", ctClass);
setMethod.setModifiers(setMethod.getModifiers() | AccessFlag.SYNTHETIC);
ctClass.addMethod(setMethod);
createAnnotation(getAnnotations(setMethod), PlayPropertyAccessor.class);
}
Expand Down

0 comments on commit 892503c

Please sign in to comment.