diff --git a/src/main/java/com/zaxxer/hikari/util/ClassLoaderUtils.java b/src/main/java/com/zaxxer/hikari/util/ClassLoaderUtils.java deleted file mode 100644 index 40840de1..00000000 --- a/src/main/java/com/zaxxer/hikari/util/ClassLoaderUtils.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2013, 2014 Brett Wooldridge - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.zaxxer.hikari.util; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** - * Methods useful for class reflection and class loading. - * - * @author Brett Wooldridge - */ -public final class ClassLoaderUtils -{ - public static Set> getAllInterfaces(Class clazz) - { - Set> interfaces = new HashSet<>(); - for (Class intf : Arrays.asList(clazz.getInterfaces())) { - if (intf.getInterfaces().length > 0) { - interfaces.addAll(getAllInterfaces(intf)); - } - interfaces.add(intf); - } - if (clazz.getSuperclass() != null) { - interfaces.addAll(getAllInterfaces(clazz.getSuperclass())); - } - - if (clazz.isInterface()) { - interfaces.add(clazz); - } - - return interfaces; - } -}