code: @SuppressWarnings("unchecked")
  	private <T> T getPropertyAs(String propertyName, Class<T> propertyType) {
  		final String sValue = properties == null ? null : properties.getProperty(propertyName);
  		final T value;
  		if (sValue == null) {
  			value = null;
  		} else if (propertyType.equals(String.class)) {
  			value = propertyType.cast(sValue);
  		} else if (propertyType.equals(Integer.class)) {
  			value = propertyType.cast(Integer.valueOf(sValue));
  		} else if (propertyType.equals(int.class)) {
  			value = (T) Integer.valueOf(sValue);
  		} else if (propertyType.equals(Long.class)) {
  			value = propertyType.cast(Long.valueOf(sValue));
  		} else if (propertyType.equals(long.class)) {
  			value = (T) Long.valueOf(sValue);
  		} else if (propertyType.equals(Boolean.class)) {
  			value = propertyType.cast(Boolean.valueOf(sValue));
  		} else if (propertyType.equals(boolean.class)) {
  			value = (T) Boolean.valueOf(sValue);
  		} else {
  			value = null;
  		}
  		return value;
  	}
docs: Returns property from {@link #properties} and convert it to given type.
  
  @param <T> property type
  @param propertyName property name
  @param propertyType property type
  @return property value