Interface INativeMethodItem
- All Superinterfaces:
ICodeItem
,ICodeMethod
,INativeItem
,INativeItemListenable
A method item references an external or internal native routine. Internal routines have
associated
INativeMethodDataItem
objects defining them.-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
FLAG_ABSTRACT, FLAG_ANNOTATION, FLAG_ANONYMOUS, FLAG_ARTIFICIAL, FLAG_BRIDGE, FLAG_CONSTRUCTOR, FLAG_DECLARED_SYNCHRONIZED, FLAG_DESTRUCTOR, FLAG_ENUM, FLAG_FINAL, FLAG_INNER, FLAG_INTERFACE, FLAG_INTERNAL, FLAG_NATIVE, FLAG_PRIVATE, FLAG_PROTECTED, FLAG_PUBLIC, FLAG_STATIC, FLAG_STRICT, FLAG_SYNCHRONIZED, FLAG_SYNTHETIC, FLAG_TRANSIENT, FLAG_VARARGS, FLAG_VIRTUAL, FLAG_VOLATILE
-
Method Summary
Modifier and TypeMethodDescriptionGet the type of the class holding this method.getData()
If the method is internal, retrieve the method's definition object.List<? extends IInstruction>
Retrieve a list of instructions for this method.default Long
Convenience method to retrieve the physical address of the routine start, if a definition object is present.Retrieve a hint specifying whether or not the method returns to its caller.getParameterName
(int index) Retrieve a list of parameter names.List<? extends INativeType>
Get the method's parameters list.Retrieve the method prototype, if one was set.Get the method's return type.boolean
Determine if the native prototype was auto-generated.boolean
Determine whether this method matched a well-known method signed by one of JEB's code signing system.boolean
boolean
void
setNonReturning
(Boolean nonReturning) Specify whether the method returns to its caller upon completion.void
setParameterName
(int index, String name) void
setParameterNames
(Collection<String> names) void
setPrototype
(IPrototypeItem prototype) Set or update a prototype.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
getAddress, getAddress, getGenericFlags, getIndex, getItemId, getName, getName, getSignature, getSignature, getSignature, isArtificial, isInternal
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItem
addFlags, dispose, getAttribute, getAttributes, hasAttribute, hasFlag, hasTrueAttribute, isAutoGenerated, isDisposed, isRenamed, removeAttribute, removeFlags, setAttribute, setAutoGenerated, setFlags, setName
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListenable
addListener, removeListener
-
Method Details
-
isAutoGeneratedPrototype
boolean isAutoGeneratedPrototype()Determine if the native prototype was auto-generated. The value is irrelevant ifgetPrototype()
returns null.- Returns:
- true if the prototype was automatically generated
-
getPrototype
IPrototypeItem getPrototype()Retrieve the method prototype, if one was set.- Returns:
- the prototype or null (if unknown)
-
setPrototype
Set or update a prototype. Any wildcard prototype attached to the routine will be nullified.- Parameters:
prototype
-
-
getData
INativeMethodDataItem getData()If the method is internal, retrieve the method's definition object.- Returns:
- the method data object; null if the method is external
-
getMemoryAddress
Convenience method to retrieve the physical address of the routine start, if a definition object is present.- Returns:
- an address or null if this reference does not link to a definition object
-
getClassType
IClassType getClassType()Description copied from interface:ICodeMethod
Get the type of the class holding this method. This method will return null if the method is class-less (example, a native sub-routine not contained in any class).- Specified by:
getClassType
in interfaceICodeMethod
- Returns:
- the class type, null if unknown
-
getClassItem
INativeClassItem getClassItem() -
isVirtualMethod
boolean isVirtualMethod() -
getReturnType
INativeType getReturnType()Description copied from interface:ICodeMethod
Get the method's return type.- Specified by:
getReturnType
in interfaceICodeMethod
- Returns:
- the return type, null if unknown
-
getParameterTypes
List<? extends INativeType> getParameterTypes()Description copied from interface:ICodeMethod
Get the method's parameters list.- Specified by:
getParameterTypes
in interfaceICodeMethod
- Returns:
- the parameter types, null if unknown
-
getParameterNames
Retrieve a list of parameter names.- Returns:
- a list, possibly empty (or containing less entries than the actual parameter count); never null
-
getParameterName
- Parameters:
index
-- Returns:
-
setParameterNames
- Parameters:
names
-
-
setParameterName
- Parameters:
index
-name
-
-
getFunctionPointer
IReferenceType getFunctionPointer() -
getInstructions
List<? extends IInstruction> getInstructions()Retrieve a list of instructions for this method. It is preferable to usegetData()
andINativeMethodDataItem.getCFG()
instead.- Specified by:
getInstructions
in interfaceICodeMethod
- Returns:
- null if the method has no body; else, a list (possibly empty) of instructions
-
getNonReturning
Boolean getNonReturning()Retrieve a hint specifying whether or not the method returns to its caller. Note that this information may be provided inprototype
.- Returns:
- null if not present or not computed
-
setNonReturning
Specify whether the method returns to its caller upon completion. Note that this information may be provided inprototype
.- Parameters:
nonReturning
-
-
isPlaceholderMethod
boolean isPlaceholderMethod()- Returns:
-
isDetectedAsLibraryCode
boolean isDetectedAsLibraryCode()Determine whether this method matched a well-known method signed by one of JEB's code signing system.- Returns:
-
getFinalName
String getFinalName()
-