/**
* Gets a property with databinding. The type must have {@link com.cloudbees.mtslaves.client.properties.PropertyName} annotation on it.
*/
public <T extends Property> T getProperty(Class<T> type) {
PropertyName pn = type.getAnnotation(PropertyName.class);
if (pn==null) throw new IllegalArgumentException(type+" does not have @PropertyName");
return getProperty(pn.value(),type);
}