public class MibLocator
extends java.lang.Object
Constructor and Description |
---|
MibLocator(java.lang.ClassLoader classLoader,
java.lang.String path)
Creates a new MIB module locator for a resource path on the
class path.
|
MibLocator(java.io.File dir)
Creates a new MIB module locator for a file directory.
|
Modifier and Type | Method and Description |
---|---|
MibSource |
findByContent(java.lang.String mibName)
Searches for a MIB in the content cache.
|
MibSource |
findByName(java.lang.String mibName)
Searches for a MIB in the file name cache.
|
java.util.Map<java.lang.String,MibSource> |
getContentMap()
Returns (and creates if needed) the MIB file content map.
|
java.io.File |
getDir()
Returns the directory or resource path indexed.
|
java.util.Map<java.lang.String,MibSource> |
getNameMap()
Returns (and creates if needed) the MIB file name map.
|
java.net.URL |
getUrl()
Returns a URL to the directory or resource path indexed.
|
boolean |
isResourceDir()
Checks if the class loader is used for locating resources.
|
public MibLocator(java.io.File dir)
dir
- the directory to indexpublic MibLocator(java.lang.ClassLoader classLoader, java.lang.String path)
classLoader
- the class loader to usepath
- the resource path to indexpublic boolean isResourceDir()
public java.io.File getDir()
public java.net.URL getUrl()
public java.util.Map<java.lang.String,MibSource> getNameMap()
public java.util.Map<java.lang.String,MibSource> getContentMap()
public MibSource findByName(java.lang.String mibName)
mibName
- the MIB namepublic MibSource findByContent(java.lang.String mibName)
mibName
- the MIB name