/** * Will it comment it aprox. 2 minutes before getDeclaredFieldClassType * method * * @throws NotFoundException */ public static JType getDeclaredFieldType(JClassType classType, String property) throws NotFoundException { Object propertyRepresentation = RebindUtils.getDeclaredField(classType, property); if (propertyRepresentation == null) { return null; } if (propertyRepresentation instanceof JField) { return ((JField) propertyRepresentation).getType(); } else if (propertyRepresentation instanceof JMethod) { return ((JMethod) propertyRepresentation).getReturnType(); } else { throw new NotFoundException("Unsupported property type = " + propertyRepresentation.getClass().getName() + ", classType = " + classType + ", property = " + property); } }
+ ", property = " + property); return getDeclaredField(propertyType, property.substring(dotIndex + 1));