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 TypeMethodDescriptionvoid
addFlags
(int additions) Add bits to the existingflags
.void
dispose
(boolean notify) Release resources used byINativeDataItem
<T> T
getAttribute
(String name, Class<T> clazz) Retrieve an attribute by name.Retrieve a map of the item's attributes.boolean
hasAttribute
(String name) Determine whether this item has an attribute.boolean
hasFlag
(int flag) Indicate ifINativeItem
has a particular flag.boolean
hasTrueAttribute
(String name) Convenience method to determine whether the item has an attribute and the attribute value istrue
.boolean
Determine whether this item is marked as auto-generated.boolean
Indicate if item was disposed.boolean
Convenience method used to determine whether this item has an effective name different than its original name.boolean
removeAttribute
(String name) Remove an attribute.void
removeFlags
(int subtractions) Remove bits from the existingflags
.boolean
setAttribute
(String name, Object data) Set an attribute.void
setAutoGenerated
(boolean autoGenerated) Set a flag specifying whether this item was auto-generated by the native analyzer.void
setFlags
(int newFlags) Set theflags
.void
Set 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, isInternal
Methods 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
-
-
addFlags
void addFlags(int additions) Add bits to the existingflags
.- Parameters:
additions
-
-
removeFlags
void removeFlags(int subtractions) Remove bits from the existingflags
.- Parameters:
subtractions
-
-
hasFlag
boolean hasFlag(int flag) Indicate ifINativeItem
has a particular flag.
Equivalent to(
.ICodeItem.getGenericFlags()
& flag) != 0- Parameters:
flag
-
-
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:
-
removeAttribute
Remove an attribute.- Parameters:
name
-- Returns:
-
hasAttribute
Determine whether this item has an attribute.- Parameters:
name
-- Returns:
-
hasTrueAttribute
Convenience method to determine whether the item has an attribute and the attribute value istrue
.- Parameters:
name
-- Returns:
-
getAttribute
Retrieve an attribute by name.- Parameters:
name
-clazz
-- Returns:
-
getAttributes
Retrieve a map of the item's attributes.- Returns:
-
setAutoGenerated
void setAutoGenerated(boolean autoGenerated) Set a flag specifying whether this item was auto-generated by the native analyzer. This flag cna 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
-
-
isAutoGenerated
boolean isAutoGenerated()Determine whether this item is marked as auto-generated.- Returns:
-
dispose
void dispose(boolean notify) Release resources used byINativeDataItem
- Parameters:
notify
- when true, this method issues aNativeItemEventType.DISPOSED
event 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.
-