-
Notifications
You must be signed in to change notification settings - Fork 23
/
JDBCDriverLoader.java
53 lines (48 loc) · 1.05 KB
/
JDBCDriverLoader.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*-------------------------------------------------------------------------
*
* foreign-data wrapper for JDBC
*
* Copyright (c) 2012, PostgreSQL Global Development Group
*
* This software is released under the PostgreSQL Licence
*
* Author: Atri Sharma <atri.jiit@gmail.com>
*
* IDENTIFICATION
* jdbc_fdw/JDBCDriverLoader.java
*
*-------------------------------------------------------------------------
*/
import java.net.URL;
import java.net.URLClassLoader;
import java.net.MalformedURLException;
public class JDBCDriverLoader extends URLClassLoader
{
/*
* JDBCDriverLoader
* Constructor of JDBCDriverLoader class.
*/
public
JDBCDriverLoader(URL[] path)
{
super(path);
}
/*
* addPath
* Adds a path to the path of the loader.
*/
public void
addPath(String path) throws MalformedURLException
{
addURL(new URL (path));
}
/*
* CheckIfClassIsLoaded
* Checks if a class of given classname has been loaded by the loader or not.
*/
public Class<?>
CheckIfClassIsLoaded(String ClassName)
{
return findLoadedClass(ClassName);
}
}