Skip to content
Snippets Groups Projects
Commit 6c6d73bb authored by Simon Barner's avatar Simon Barner
Browse files

- Retire now unused method isDirectlyDerived()

refs 2950
parent 5ca9cb66
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ EcoreSerializerBase.java 63b879cb32a0981dc1fefaf33db098abe81fe520 GREEN
EcoreUtils.java 008f4743d5092afb13c7f4cbbfcb83f1dc6b7721 GREEN
ExtensionPointUtils.java e3ec0d396b0a88c040fd0117d4a369340d6099f4 GREEN
IdentifierUtils.java d074a0f40d0ace7c2dd4ec145f0c2d783fbe115d GREEN
JavaUtils.java 160d4e741faac5387da033ee71b5aba898eae3c6 GREEN
JavaUtils.java 88bebee35226100989e118b272c766fa63f3c87c YELLOW
KernelModelElementUtils.java c40d78a15046637061ad84a16c8511376ff3d8ba GREEN
LoggingUtils.java 53c7a8eaa6955112bd1890e0a5ca5437013ccb02 GREEN
MigrationUtils.java e54370b19148ff656d7563e8188baccd947c24d5 GREEN
......
......@@ -82,28 +82,4 @@ public class JavaUtils {
return buffer.toString();
}
/**
* Predicate whether a given {@code type} is directly derived from a given {@code superType}, or
* whether the {@code type} implements the {@code superType} interface.
*
* @param type
* Type to for which to check if it is directly derived from the given
* {@code superType}.
* @param superType
* Super-type which should be tested for the given {@code type}.
*
* @return {@code true} iff a given {@code type} is directly derived from a given
* {@code superType}, or if the {@code type} implements the {@code superType} interface.
*/
public static boolean isDirectlyDerived(Class<?> type, Class<?> superType) {
for(Class<?> iFace : type.getInterfaces()) {
if(iFace.equals(superType)) {
return true;
}
}
Class<?> typeSuperClass = type.getSuperclass();
return typeSuperClass != null && typeSuperClass.equals(superType);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment