Interface INativeItem
- All Superinterfaces:
ICodeItem,INativeItemListenable
- All Known Subinterfaces:
IAliasType,IArrayType,IClassType,IEnumerationType,INativeClassDataItem,INativeClassItem,INativeContinuousItem,INativeDataItem,INativeFieldItem,INativeInstructionItem,INativeMemoryItem,INativeMethodDataItem,INativeMethodItem,INativeStringItem,INativeType,IPrimitiveType,IPrototypeItem,IReferenceType,IStructureType,IWildcardPrototype,IWildcardType
Master interface for all native code items (objects, types, etc.).
-
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 TypeMethodDescriptionvoidaddFlags(int additions) Add bits to the existingflags.voiddispose(boolean notify) Release resources used byINativeDataItem<T> TgetAttribute(String name, Class<T> clazz) Retrieve an attribute by name.Retrieve a map of the item's attributes.booleanhasAttribute(String name) Determine whether this item has an attribute.booleanhasFlag(int flag) Indicate ifINativeItemhas a particular flag.booleanhasTrueAttribute(String name) Convenience method to determine whether the item has an attribute and the attribute value istrue.booleanDetermine whether this item is marked as auto-generated.booleanIndicate if item was disposed.booleanConvenience method used to determine whether this item has an effective name different than its original name.booleanremoveAttribute(String name) Remove an attribute.voidremoveFlags(int subtractions) Remove bits from the existingflags.booleansetAttribute(String name, Object data) Set an attribute.voidsetAutoGenerated(boolean autoGenerated) Set a flag specifying whether this item was auto-generated by the native analyzer.voidsetFlags(int newFlags) Set theflags.voidSet the effective name of the native item.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
getAddress, getAddress, getGenericFlags, getIndex, getItemId, getName, getName, getSignature, getSignature, getSignature, isArtificial, isInternalMethods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListenable
addListener, removeListener
-
Method Details
-
setFlags
void setFlags(int newFlags) Set theflags.- Parameters:
newFlags- new flags
-
addFlags
void addFlags(int additions) Add bits to the existingflags.- Parameters:
additions- flags to add
-
removeFlags
void removeFlags(int subtractions) Remove bits from the existingflags.- Parameters:
subtractions- flags to remove
-
hasFlag
boolean hasFlag(int flag) - Parameters:
flag- flag to test- Returns:
- true if the flag is set
-
setName
Set the effective name of the native item. All native items can have a name.- Parameters:
name- the new name; use null to reset the item name to its original name
-
isRenamed
boolean isRenamed()Convenience method used to determine whether this item has an effective name different than its original name.- Returns:
- true if the item was renamed
-
setAttribute
Set an attribute.- Parameters:
name- cannot be nulldata- if null, the attribute is not set or removed if it were present- Returns:
- true if the attribute was set or removed
-
removeAttribute
Remove an attribute.- Parameters:
name- attribute name- Returns:
- true if the attribute was removed
-
hasAttribute
Determine whether this item has an attribute.- Parameters:
name- attribute name- Returns:
- true if the attribute exists
-
hasTrueAttribute
Convenience method to determine whether the item has an attribute and the attribute value istrue.- Parameters:
name- attribute name- Returns:
- true if the attribute exists and is true
-
getAttribute
Retrieve an attribute by name.- Type Parameters:
T- expected attribute type- Parameters:
name- attribute nameclazz- expected attribute type- Returns:
- attribute value, or null
-
getAttributes
Retrieve a map of the item's attributes.- Returns:
- attribute map
-
setAutoGenerated
void setAutoGenerated(boolean autoGenerated) Set a flag specifying whether this item was auto-generated by the native analyzer. This flag can be used by other components and plugins. Typically, auto-generated items may be modified more liberally than non auto-generated items, which are likely to be created by users.s- Parameters:
autoGenerated- true if the item is auto-generated
-
isAutoGenerated
boolean isAutoGenerated()Determine whether this item is marked as auto-generated.- Returns:
- true if this item is auto-generated
-
dispose
void dispose(boolean notify) Release resources used byINativeDataItem- Parameters:
notify- when true, this method issues aNativeItemEventType.DISPOSEDevent after the object was disposed.
-
isDisposed
boolean isDisposed()Indicate if item was disposed.- Returns:
- true if item is disposed, false if item is safely usable.
-