if (declaration instanceof MethodDeclaration) {
MethodDeclaration method = (MethodDeclaration) declaration;
// Copy properties from class to methods
Set<?> properties = element.properties().keySet();
for (String property : (String[]) properties
.toArray(new String[element.properties().size()])) {
method.setProperty(property,
element.getProperty(property));
}
// Set a unique identifier (required for DND)
String sign = "" + method.getReturnType2()