Download this file

AttributesHelper.java    25 lines (14 with data), 509 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package eu.alfred.personalization_manager.model;
import java.lang.reflect.Field;
import java.util.HashSet;
public class AttributesHelper {
public HashSet<String> getUserProfileFields() {
UserProfile userProfile = new UserProfile();
Class<?> c = userProfile.getClass();
Field[] fields = c.getDeclaredFields();
HashSet<String> userProfileFields = new HashSet<String>();
for(Field field : fields)
userProfileFields.add(field.getName());
return userProfileFields;
}
}