public abstract class ProcAddressTable extends Object
FunctionAddressResolver
,
DynamicLookupHelper
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEBUG |
protected static String |
DEBUG_PREFIX |
protected static int |
debugNum |
Constructor and Description |
---|
ProcAddressTable() |
ProcAddressTable(FunctionAddressResolver resolver) |
Modifier and Type | Method and Description |
---|---|
long |
getAddressFor(String functionName)
This is a convenience method to query the native function handle by name.
|
Set<String> |
getNullPointerFunctions()
Returns all functions pointing to null.
|
void |
initEntry(String name,
DynamicLookupHelper lookup)
Initializes the mapping for a single function.
|
boolean |
isFunctionAvailable(String functionName)
Returns true only if non null function pointer to this function exists.
|
protected boolean |
isFunctionAvailableImpl(String functionName)
This is a convenience method to query the native function existence by name.
|
void |
reset(DynamicLookupHelper lookup)
Resets the complete table.
|
String |
toString() |
protected static boolean DEBUG
protected static String DEBUG_PREFIX
protected static int debugNum
public ProcAddressTable()
public ProcAddressTable(FunctionAddressResolver resolver)
public void reset(DynamicLookupHelper lookup) throws SecurityException, RuntimeException
If a SecurityManager
is installed, user needs link permissions
for all libraries, i.e. for new RuntimePermission("loadLibrary.*");
!
SecurityException
- if user is not granted access for all libraries.RuntimeException
public void initEntry(String name, DynamicLookupHelper lookup) throws SecurityException, IllegalArgumentException
If a SecurityManager
is installed, user needs link permissions
for all libraries, i.e. for new RuntimePermission("loadLibrary.*");
!
IllegalArgumentException
- if this function is not in this table.SecurityException
- if user is not granted access for all libraries.public final boolean isFunctionAvailable(String functionName)
protected boolean isFunctionAvailableImpl(String functionName) throws IllegalArgumentException
It lets you avoid having to
manually compute the "PROCADDRESS_VAR_PREFIX
+ <functionName>"
member variable name and look it up via reflection.
IllegalArgumentException
- if this function is not in this table.public long getAddressFor(String functionName) throws SecurityException, IllegalArgumentException
It lets you avoid having to
manually compute the "PROCADDRESS_VAR_PREFIX
+ <functionName>"
member variable name and look it up via reflection.
If a SecurityManager
is installed, user needs link permissions
for all libraries, i.e. for new RuntimePermission("loadLibrary.*");
!
IllegalArgumentException
- if this function is not in this table.SecurityException
- if user is not granted access for all libraries.public final Set<String> getNullPointerFunctions()