diff --git a/plugins/contracts/org.polarsys.chess.contracts.profile/src/org/polarsys/chess/contracts/profile/chesscontract/util/EntityUtil.java b/plugins/contracts/org.polarsys.chess.contracts.profile/src/org/polarsys/chess/contracts/profile/chesscontract/util/EntityUtil.java
index 8a9859c450e4fc295f4d0d8663635ac344d6d814..6fad1cd2b482ef5bd4e3b9cd22c82725df8ee1cf 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.profile/src/org/polarsys/chess/contracts/profile/chesscontract/util/EntityUtil.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.profile/src/org/polarsys/chess/contracts/profile/chesscontract/util/EntityUtil.java
@@ -4182,6 +4182,7 @@ public class EntityUtil {
 		return null;
 	}
 	
+	@SuppressWarnings("unchecked")
 	public Collection<Enumeration> getAllEnumeratives(Package packageElement) throws Exception {
 		return (Collection<Enumeration>) EObjectUtil.getAllElements(UMLPackage.eINSTANCE.getEnumeration(),
 				packageElement);
@@ -4197,6 +4198,13 @@ public class EntityUtil {
 		throw new Exception("Element does not exist.");
 	}
 
+	/**
+	 * Returns all the classes in the model.
+	 * <p> BEWARE: all the classes, not only the classes in the given package
+	 * @param packageElement
+	 * @return
+	 * @throws Exception
+	 */
 	public Collection<Class> getAllClasses(Package packageElement) throws Exception {
 		Collection<Class> classElements = null;
 		if (packageElement != null) {
@@ -4220,4 +4228,30 @@ public class EntityUtil {
 		}
 		return result;
 	}
+
+	/**
+	 * Returns the Class elements directly contained in a package.
+	 * @param pkg the Package
+	 * @return the Class children
+	 */
+	public Collection<Class> getPackageClasses(Package pkg) throws Exception {
+		Collection<Class> classElements = null;
+		if (pkg != null) {
+			Collection<Element> ownedElements = pkg.getOwnedElements();
+			if (ownedElements != null) {
+				classElements = getClasses(ownedElements);
+			}
+			return classElements;
+		}
+		throw new Exception("Package does not exist.");
+	}
+	
+	private Collection<Class> getClasses(Collection<Element> elements) {
+		Collection<Class> result = new ArrayList<Class>();
+		for (Element element : elements) {
+			if (isBlock(element)) result.add((Class) element);
+		}
+		return result;
+	}
+
 }
\ No newline at end of file