if (toGenerate == null) {
logger.log(Type.ERROR, typeName + " is not an interface");
throw new UnableToCompleteException();
}
PropertyName annotation = toGenerate.getAnnotation(PropertyName.class);
if (annotation == null) {
logger.log(Type.ERROR, "Cannot generate with a @PropertyName anntation on the type");
throw new UnableToCompleteException();
}
String propertyName = annotation.value();
SelectionProperty property;
String value;
try {
property = context.getPropertyOracle().getSelectionProperty(logger, propertyName);
value = property.getCurrentValue();