public class

TypeLibraryService

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.type.TypeLibraryService

Class Overview

Currently, one TLS per JEB engines context.

Summary

Constants
int GROUPID_TYPELIB_LINUX
int GROUPID_TYPELIB_POSIX
int GROUPID_TYPELIB_TEST
int GROUPID_TYPELIB_WIN32
String TYPELIB_FILE_EXTENSION
Public Constructors
TypeLibraryService()
Create a new TLS.
TypeLibraryService(File folder)
Create a new TLS with an initial folder.
Public Methods
void addFolder(File folder, boolean doRescan)
Add a typelib folder to this TLS.
INativeMethodItem findRoutineByName(String name, ProcessorType procType, int groupId)
Find a routine by simple name in the currently loaded typelibs.
INativeMethodItem findRoutineByName(String name, ProcessorType procType)
Convenience method.
INativeType findTypeBySignature(String signature, ProcessorType procType, int optionalGroupId)
Find a type by signature in the currently loaded typelibs.
INativeType findTypeBySignature(String signature, ProcessorType procType)
Convenience method.
List<TypeLibraryEntry> getAvailables()
Get the list of available type libraries.
List<ITypeLibrary> getByName(String name)
List<ITypeLibrary> getLoadedTypeLibraries()
Get the list of loaded type libraries.
static String groupIdToName(int id)
boolean load(ProcessorType processorType, int groupId)
Attempt to load a given type library (by ID) for a given processor type.
boolean load(TypeLibraryEntry entry)
Load the provided type library into this TLS.
boolean loadExternal(ITypeLibrary typelib)
void rescan()
Rescan the type library folders to register/unregister additional/removed typelib binary files.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int GROUPID_TYPELIB_LINUX

Constant Value: 2 (0x00000002)

public static final int GROUPID_TYPELIB_POSIX

Constant Value: 1 (0x00000001)

public static final int GROUPID_TYPELIB_TEST

Constant Value: 100 (0x00000064)

public static final int GROUPID_TYPELIB_WIN32

Constant Value: 10 (0x0000000a)

public static final String TYPELIB_FILE_EXTENSION

Constant Value: ".typelib"

Public Constructors

public TypeLibraryService ()

Create a new TLS. At least one folder must be added using addFolder(File, boolean).

public TypeLibraryService (File folder)

Create a new TLS with an initial folder. The folder will be scanned.

Public Methods

public void addFolder (File folder, boolean doRescan)

Add a typelib folder to this TLS.

Parameters
doRescan if true, rescan() will be invoked after the folder addition

public INativeMethodItem findRoutineByName (String name, ProcessorType procType, int groupId)

Find a routine by simple name in the currently loaded typelibs. Convenience routine.

Parameters
name routine name
procType mandatory
groupId optional (0 if none/unknown)

public INativeMethodItem findRoutineByName (String name, ProcessorType procType)

Convenience method.

Parameters
name routine name
procType mandatory

public INativeType findTypeBySignature (String signature, ProcessorType procType, int optionalGroupId)

Find a type by signature in the currently loaded typelibs. Convenience routine.

public INativeType findTypeBySignature (String signature, ProcessorType procType)

Convenience method.

Parameters
procType mandatory

public List<TypeLibraryEntry> getAvailables ()

Get the list of available type libraries. An available typelib is not necessarily loaded. Refer to TypeLibraryEntry for additional details about the state of a given typelib.

public List<ITypeLibrary> getByName (String name)

public List<ITypeLibrary> getLoadedTypeLibraries ()

Get the list of loaded type libraries. More type libraries may be available, eg non-loaded ones.

public static String groupIdToName (int id)

public boolean load (ProcessorType processorType, int groupId)

Attempt to load a given type library (by ID) for a given processor type.

Returns
  • success indicator

public boolean load (TypeLibraryEntry entry)

Load the provided type library into this TLS.

public boolean loadExternal (ITypeLibrary typelib)

public void rescan ()

Rescan the type library folders to register/unregister additional/removed typelib binary files.