public <T> T getProperty(final String name, final Class<T> clazz) {
        if (containsProperty(name)) {
            val item = this.properties.get(name);
            if (item == null) {
                return null;
            }
            if (!clazz.isAssignableFrom(item.getClass())) {
                throw new ClassCastException("Object [" + item + " is of type "
                                             + item.getClass() + " when we were expecting " + clazz);
            }
            return (T) item;
        }
        return null;
    }
Gets property.

@param <T>   the type parameter
@param name  the name
@param clazz the clazz
@return the property
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/cache/DistributedCacheObject.java