in core/bootstrap/src/main/java/org/yaml/snakeyaml/introspector/PropertySubstitute.java [171:210]
public void setTargetType(Class<?> targetType) {
if (this.targetType != targetType) {
this.targetType = targetType;
final String name = getName();
for (Class<?> c = targetType; c != null; c = c.getSuperclass()) {
for (Field f : c.getDeclaredFields()) {
if (f.getName().equals(name)) {
int modifiers = f.getModifiers();
if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers)) {
f.setAccessible(true);
field = f;
}
break;
}
}
}
// Thorntail::BEGIN
/*
if (field == null && log.isLoggable(Level.FINE)) {
log.fine(String.format("Failed to find field for %s.%s", targetType.getName(),
getName()));
}
*/
// Thorntail::END
// Retrieve needed info
if (readMethod != null) {
read = discoverMethod(targetType, readMethod);
}
if (writeMethod != null) {
filler = false;
write = discoverMethod(targetType, writeMethod, getType());
if (write == null && parameters != null) {
filler = true;
write = discoverMethod(targetType, writeMethod, parameters);
}
}
}
}