From 6c6d73bb87e662a62b49802fcd0197bc0c96fffd Mon Sep 17 00:00:00 2001 From: Simon Barner <barner@fortiss.org> Date: Wed, 13 Dec 2017 16:37:44 +0000 Subject: [PATCH] - Retire now unused method isDirectlyDerived() refs 2950 --- .../org/fortiss/tooling/kernel/utils/.ratings | 2 +- .../tooling/kernel/utils/JavaUtils.java | 24 ------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/.ratings b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/.ratings index 496d4e949..1ff30f580 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/.ratings +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/.ratings @@ -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 diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/JavaUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/JavaUtils.java index 1a83309b4..65cdadfb9 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/JavaUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/JavaUtils.java @@ -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); - } } -- GitLab