Code example for HashSet

Methods: addAllsizetoArray

0
		} 
	} 
 
	private Method[] getMethods(Class<?> type, Object targetObject) {
		if (targetObject instanceof Class) {
			Set<Method> methods = new HashSet<Method>();
			methods.addAll(Arrays.asList(getMethods(type)));
			methods.addAll(Arrays.asList(getMethods(targetObject.getClass())));
			return methods.toArray(new Method[methods.size()]);
		} 
		return getMethods(type);
	} 
 
	/** 
	 * Return the set of methods for this type. The default implementation returns the 
	 * result of {@link Class#getMethods()} for the given {@code type}, but subclasses 
	 * may override in order to alter the results, e.g. specifying static methods 
	 * declared elsewhere. 
	 * @param type the class for which to return the methods 
	 * @since 3.1.1