Removes all properties of a given class from this component.
@param clazz the class of the properties to remove (e.g.
"DateStart.class")
@param <T> the property class
@return the removed properties (this list is immutable)
187695
public <T extends ICalProperty> List<T> removeProperties(Class<T> clazz) {
		List<ICalProperty> removed = properties.removeAll(clazz);
		return castList(removed, clazz);
	}
953344
public static Map<String, BeanProperty> getAllProperties(Class clazz) {
        synchronized (cPropertiesCache) {
            Map<String, BeanProperty> properties;
            SoftReference<Map<String, BeanProperty>> ref = cPropertiesCache.get(clazz);
            if (ref != null) {
                properties = ref.get();
                if (properties != null) {
                    return properties;
                }
            }
            properties = createProperties(clazz);
            cPropertiesCache.put(clazz, new SoftReference<Map<String, BeanProperty>>(properties));
            return properties;
        }
    }
341775
public static List<Method> getAccessors(Class<?> clazz) {
    if (clazz == null) {
      throw new IllegalArgumentException("The 'clazz' parameter cannot be null.");
    }

    List<Method> methods = new ArrayList<>();
    for (Method method : clazz.getMethods()) {
      String methodName = method.getName();
      if (!"getClass".equals(methodName) && !"hashCode".equals(methodName) && method.getReturnType() != null
          && !Void.class.equals(method.getReturnType()) && method.getParameterTypes().length == 0
          && ((methodName.startsWith("get") && methodName.length() > 3)
              || (methodName.startsWith("is") && methodName.length() > 2)
              || (methodName.startsWith("has") && methodName.length() > 3))) {
        methods.add(method);
      }
    }

    // Order the methods alphabetically by name
    sort(methods, new Comparator<Method>() {
      /**
       * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
       */
      @Override
      public int compare(Method method1, Method method2) {
        return method1.getName().compareTo(method2.getName());
      }
    });

    return unmodifiableList(methods);
  }
923268
public static PropertyDescriptor getProperty(Class<?> clazz, String propertyName) {
        if (clazz == null || propertyName == null) {
            return null;
        }

        try {
            return BeanUtils.getPropertyDescriptor(clazz, propertyName);
        }
        catch (Exception e) {
            // if there are any errors in instantiating just return null for the moment
            return null;
        }
    }
186706
public PropertySet removeAll( Iterator<String> properties)
    {
    if( properties != null)
      {
      while( properties.hasNext())
        {
        remove( properties.next());
        }
      }
    
    return this;
    }
508051
public <T extends ICalProperty> List<T> getProperties(Class<T> clazz) {
		return new ICalPropertyList<T>(clazz);
	}
350489
public <T> Future<?> removeDataFromCache(final Class<T> clazz) {
        if (clazz == null) {
            throw new IllegalArgumentException("Clazz must be non null.");
        }
        return executeCommand(new RemoveDataClassFromCacheCommand(this, clazz));
    }
1009202
public static Collection<String> getPropertyNames(
                    final Class<?> clazz
                    )
    {
        if (clazz == null) {
            throw new IllegalArgumentException( "no class specified" );
        }

        Map<String, PropertyAccessor>  accessors = _getAccessors( clazz );

        return accessors.keySet();
    }
1197892
@SuppressWarnings("unchecked")
	@Override
	public <T> T getProperty(Object key, Class<T> clazz) {
	    return (T)getProperty(key);
	}
547541
public static Map<String, Method> getSetters(Class<?> clazz) {
		Map<String, Method> setters = new HashMap<String, Method>();
		Method[] methods = clazz.getMethods();
		for (Method method : methods) {
			String methodName = method.getName();
			if (method.getParameterTypes().length == 1
					&& methodName.startsWith("set") && methodName.length() > 3
					&& method.getReturnType() == Void.TYPE) {
				String propertyName = methodName.substring(3, 4).toLowerCase();
				if (methodName.length() > 4) {
					propertyName += methodName.substring(4);
				}
				setters.put(propertyName, method);
			}
		}
		return setters;
	}
742082
@SuppressWarnings({ "unchecked", "rawtypes" })
    public <T extends AbstractSchemaProperty> Set<T> get(final Class<T> clazz) {
        return (Set<T>) properties.get(clazz);
    }
1266267
public static Class<?> getPropertyClass(Class<?> clazz, List<String> propertyPath) {
		Class<?> current = clazz;
		for (String propertyName : propertyPath) {
			current = getPropertyClass(current, propertyName);
		}
		return current;
	}
703010
public static <B> BeanPropertyAccessor<B> forClass(Class<B> clazz) {
        return forClass(clazz, PropertySet.ALL);
    }
154866
public static Val get(Class<?> clazz, String... propertyComponents) {
      return get(clazz.getName(), propertyComponents);
   }
776277
public List<RawProperty> removeExperimentalProperties(String name) {
		List<RawProperty> all = getExperimentalProperties();
		List<RawProperty> toRemove = new ArrayList<RawProperty>();
		for (RawProperty property : all) {
			if (property.getName().equalsIgnoreCase(name)) {
				toRemove.add(property);
			}
		}

		all.removeAll(toRemove);
		return Collections.unmodifiableList(toRemove);
	}
963334
public static <T> T nullable(Class<T> clazz) {
        AdditionalMatchers.or(isNull(), isA(clazz));
        return  (T) Primitives.defaultValue(clazz);
    }
926849
@Override
    public <T> T getProperty(Object key, Class<T> clazz) {
        return clazz.cast(getProperty(key));
    }