Remove unused class
parent
9c3e22e267
commit
b74d708302
@ -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<Class<?>> getAllInterfaces(Class<?> clazz)
|
||||
{
|
||||
Set<Class<?>> 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue