}
public void autoPopulate(Object item) throws OpsException {
Class<? extends Object> itemClass = item.getClass();
for (Field field : itemClass.getFields()) {
Generate defaultAnnotation = field.getAnnotation(Generate.class);
if (defaultAnnotation != null) {
Class<?> fieldType = field.getType();
Object value;
try {
value = field.get(item);
} catch (IllegalAccessException e) {
throw new IllegalStateException("Error getting field: " + field, e);
}
if (value == null) {
String defaultValue = defaultAnnotation.value();
if (!Strings.isNullOrEmpty(defaultValue)) {
value = defaultValue;
} else {
if (fieldType == Secret.class) {
Passwords passwords = new Passwords();