if (resources.length != 0 || ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.COMPILATION_UNIT) || hasElementsLargerThanCu(javaElements)) return NO;
Assert.isTrue(resources.length == 0); Assert.isTrue(! ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.COMPILATION_UNIT)); Assert.isTrue(! hasElementsLargerThanCu(javaElements));
		public static ICopyPolicy create(IResource[] resources, IJavaElement[] javaElements){			final ICopyPolicy NO= new NoCopyPolicy();					if (  isNothingToCopy(resources, javaElements) || 				! canCopyAll(resources, javaElements) ||				! haveCommonParent(resources, javaElements) ||				ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.JAVA_PROJECT) ||				ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.JAVA_MODEL) ||				ReorgUtils2.hasElementsOfType(resources, IResource.PROJECT | IResource.ROOT))				return NO;							if (ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.PACKAGE_FRAGMENT)){				if (resources.length != 0 || ReorgUtils2.hasElementsNotOfType(javaElements, IJavaElement.PACKAGE_FRAGMENT))					return NO;				else						return new CopyPackagesPolicy(convertToPackageArray(javaElements));			}						if (ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.PACKAGE_FRAGMENT_ROOT)){				if (resources.length != 0 || ReorgUtils2.hasElementsNotOfType(javaElements, IJavaElement.PACKAGE_FRAGMENT_ROOT))					return NO;				else						return new CopyPackageFragmentRootsPolicy(convertToPackageFragmentRootArray(javaElements));			}						if (ReorgUtils2.hasElementsOfType(resources, IResource.FILE | IResource.FOLDER) || ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.COMPILATION_UNIT)){				if (ReorgUtils2.hasElementsNotOfType(javaElements, IJavaElement.COMPILATION_UNIT))					return NO;				if (ReorgUtils2.hasElementsNotOfType(resources, IResource.FILE | IResource.FOLDER))					return NO;				return new CopyFilesFoldersAndCusPolicy(ReorgUtils2.getFiles(resources), ReorgUtils2.getFolders(resources), convertToCompilationUnitArray(javaElements));			}						if (hasElementsSmallerThanCu(javaElements)){				if (resources.length != 0 ||					ReorgUtils2.hasElementsOfType(javaElements, IJavaElement.COMPILATION_UNIT) || 					hasElementsLargerThanCu(javaElements))					return NO;				return new CopySubCuElementsPolicy(javaElements);			}			return NO;		}