public Object assign(Object datamodel, Object role) { Class[] inters = role.getClass().getInterfaces(); if (inters == null || inters.length == 0) { Debug.logError( "[JdonFramework] role:" + role.getClass() + " should implements a interface when be assigned to data:" + datamodel.getClass(), module); return null; } if (datamodel.getClass().isAnnotationPresent(Model.class)) assignDomainEvents(datamodel); if (role.getClass().isAnnotationPresent(Introduce.class)) { role = modelAdvisor.createProxy(role); } return role; } <p class="indent">
[该贴被admin于2013-09-09 16:49修改过]