java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.type.TypeLibraryService |
The type library service (TLS) is responsible for managing (loading and unloading) native code
type libraries (typelibs
). There is one TLS per JEB engines context. It can be retrieved
via getTypeLibraryService()
.
This class is thread-safe.
Positive UUIDs (range [0, 0x80000000[) is reserved for internal use. External users may use negative UUIDs.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | GROUPID_TYPELIB_EFI | ||||||||||
int | GROUPID_TYPELIB_LINUX | ||||||||||
int | GROUPID_TYPELIB_LINUX_ANDROID | ||||||||||
int | GROUPID_TYPELIB_POSIX | ||||||||||
int | GROUPID_TYPELIB_TEST | reserved for internal use | |||||||||
int | GROUPID_TYPELIB_TEST1 | reserved for internal use | |||||||||
int | GROUPID_TYPELIB_TEST2 | reserved for internal use | |||||||||
int | GROUPID_TYPELIB_TEST3 | reserved for internal use | |||||||||
int | GROUPID_TYPELIB_TEST4 | reserved for internal use | |||||||||
int | GROUPID_TYPELIB_UNKNOWN | ||||||||||
int | GROUPID_TYPELIB_WIN32 | ||||||||||
int | GROUPID_TYPELIB_WINDDK | ||||||||||
int | GROUPID_TYPELIB_WINDOWS | ||||||||||
String | TYPELIB_FILE_EXTENSION |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TypeLibraryService()
Create a new TLS.
| |||||||||||
TypeLibraryService(File folder)
Create a new TLS with an initial folder.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void |
addFolder(File folder, boolean doRescan)
Add a typelib folder to this TLS.
| ||||||||||
synchronized Set<Object> |
findConstantsByName(String name, ProcessorType procType, int groupId)
Find constants by name in the currently loaded typelibs.
| ||||||||||
synchronized Long |
findFirstIntegerConstantByName(String name)
Find the first integer constant by name in the currently loaded typelibs.
| ||||||||||
synchronized INativeMethodItem |
findRoutineByName(String name, ProcessorType procType, int groupId)
Find a routine by simple name in the currently loaded typelibs.
| ||||||||||
synchronized INativeMethodItem |
findRoutineByName(String name, ProcessorType procType)
Convenience method.
| ||||||||||
synchronized INativeType |
findTypeBySignature(String signature, ProcessorType procType, int groupId)
Find a type by signature in the currently loaded typelibs.
| ||||||||||
synchronized INativeType |
findTypeBySignature(String signature, ProcessorType procType)
Find a type by signature in the currently loaded typelibs.
| ||||||||||
synchronized List<TypeLibraryEntry> |
getAvailables()
Get the list of available type library entries.
| ||||||||||
synchronized List<ITypeLibrary> |
getLoadedTypeLibraries()
Get the list of loaded type libraries.
| ||||||||||
synchronized List<TypeLibraryEntry> |
getLoadedTypeLibraryEntries()
Get the list of entries that specify a loaded typelib.
| ||||||||||
synchronized List<TypeLibraryEntry> |
getNotLoadedTypeLibraryEntries()
Get the list of entries that specify an unloaded typelib.
| ||||||||||
static String | groupIdToName(int id) | ||||||||||
synchronized boolean |
load(ProcessorType processorType, int groupId, int maxCount)
Load type libraries matching the given processor and group.
| ||||||||||
synchronized boolean |
load(ProcessorType processorType, int groupId)
Load all type libraries matching the given processor and group.
| ||||||||||
synchronized boolean |
load(TypeLibraryEntry entry)
Load the provided type library into this TLS.
| ||||||||||
synchronized boolean |
loadExternal(ITypeLibrary typelib)
Load the provided external (not backed by a file managed by this TLS) typelib object.
| ||||||||||
synchronized boolean |
loadSingle(ProcessorType processorType, int groupId)
Load the highest priority type library matching the given processor type and group.
| ||||||||||
synchronized void |
rescan(boolean deleteOldEntries)
Rescan the type library folders to register/unregister additional/removed typelib binary
files.
| ||||||||||
synchronized void | rescan() | ||||||||||
synchronized boolean |
unload(ITypeLibrary typelib)
Unload a type library.
| ||||||||||
synchronized boolean |
unload(TypeLibraryEntry e)
Unload a type library.
| ||||||||||
synchronized int |
unloadAll()
Unload all type libraries.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
reserved for internal use
reserved for internal use
reserved for internal use
reserved for internal use
reserved for internal use
Create a new TLS. At least one folder must be added using addFolder(File, boolean)
.
Create a new TLS with an initial folder. The folder will be scanned.
Add a typelib folder to this TLS.
doRescan | if true, rescan() will be invoked after the folder addition
|
---|
Find constants by name in the currently loaded typelibs. Convenience routine.
name | constant name |
---|---|
procType | optional |
groupId | optional (0 if none/unknown) |
Find the first integer constant by name in the currently loaded typelibs. Convenience routine.
name | constant name |
---|
Find a routine by simple name in the currently loaded typelibs. Convenience routine.
name | routine name |
---|---|
procType | optional |
groupId | optional (0 if none/unknown) |
Convenience method.
name | routine name |
---|---|
procType | optional |
Find a type by signature in the currently loaded typelibs. Convenience routine.
procType | optional |
---|---|
groupId | optional (0 if none/unknown) |
Find a type by signature in the currently loaded typelibs. Convenience routine.
procType | optional |
---|
Get the list of available type library entries. An available typelib is not necessarily
loaded. Refer to TypeLibraryEntry
for additional details about the state of a given
typelib.
Get the list of loaded type libraries. More type libraries may be available, eg non-loaded ones.
Get the list of entries that specify a loaded typelib.
Get the list of entries that specify an unloaded typelib.
Load type libraries matching the given processor and group.
processorType | mandatory |
---|---|
groupId | mandatory |
Load all type libraries matching the given processor and group.
Load the provided type library into this TLS.
Load the provided external (not backed by a file managed by this TLS) typelib object.
Load the highest priority type library matching the given processor type and group.
Rescan the type library folders to register/unregister additional/removed typelib binary files.
Unload a type library.
typelib | a type library |
---|
Unload a type library.
e | a typelib entry |
---|
Unload all type libraries.