class NamespaceUtils {

	public static NamespaceContext getNamespaceContext(Method method) {
		Assert.notNull(method, "'method' must not be null");
		SimpleNamespaceContext namespaceContext = new SimpleNamespaceContext();
		Class<?> endpointClass = method.getDeclaringClass();
		Package endpointPackage = endpointClass.getPackage();
		if (endpointPackage != null) {
			addNamespaceAnnotations(endpointPackage, namespaceContext);
		}
		addNamespaceAnnotations(endpointClass, namespaceContext);
		addNamespaceAnnotations(method, namespaceContext);
		return namespaceContext;
	}

	private  NamespaceUtils();

}