Interface INativeClassItem
- All Superinterfaces:
ICodeClass,ICodeItem,INativeItem,INativeItemListenable
Definition of a native class item, having a class type, methods, fields, and so on.
-
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 TypeMethodDescriptionbooleancollectVirtualMethodOverrides(INativeMethodItem method, Collection<INativeMethodItem> overUp, Collection<INativeMethodItem> overDown) Collect methods overriding or overridden by a virtual method.Get the optional type implemented by this class item.List<? extends INativeMethodItem> Retrieve constructors.Retrieve virtual method coordinates.List<? extends INativeMethodItem> Retrieve destructors.List<? extends INativeFieldItem> Get the list of fields that are defined in this class (super fields are not returned).List<? extends IClassType> Get the list of implemented interface types for this class.List<? extends INativeFieldItem> Retrieve instance fields.List<? extends INativeMethodItem> Get the instance methods defined in this class.List<? extends INativeMethodItem> Get the list of methods that are defined in this class (super methods are not returned).List<? extends INativeMethodItem> Get the non-virtual, non-static methods of this class.List<? extends INativeFieldItem> Retrieve static fields.List<? extends INativeMethodItem> Get the static methods of this class.List<? extends INativeType> Retrieve direct native subtypes.List<? extends IClassType> Get the list of super types for this class.getVirtualMethodFromCoordinates(int tableIndex, int methodIndex) Retrieve a virtual method by coordinates.List<? extends INativeMethodItem> getVirtualMethods(boolean onlyDefinedInThisClass) Get the virtual methods of this class, including or not the virtual methods defined in parent classes that were not overridden (and therefore, indirectly belonging to this class as well).List<? extends IMethodTable> Retrieve virtual method tables.booleanrenameVirtualMethod(INativeMethodItem method, String name) Rename a virtual method.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeClass
getPackageMethods 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.INativeItem
addFlags, dispose, getAttribute, getAttributes, hasAttribute, hasFlag, hasTrueAttribute, isAutoGenerated, isDisposed, isRenamed, removeAttribute, removeFlags, setAttribute, setAutoGenerated, setFlags, setNameMethods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.items.INativeItemListenable
addListener, removeListener
-
Method Details
-
getClassType
IClassType getClassType()Description copied from interface:ICodeClassGet the optional type implemented by this class item.- Specified by:
getClassTypein interfaceICodeClass- Returns:
- class type, or null
-
getSupertypes
List<? extends IClassType> getSupertypes()Description copied from interface:ICodeClassGet the list of super types for this class.- Specified by:
getSupertypesin interfaceICodeClass- Returns:
- super types
-
getImplementedInterfaces
List<? extends IClassType> getImplementedInterfaces()Description copied from interface:ICodeClassGet the list of implemented interface types for this class.- Specified by:
getImplementedInterfacesin interfaceICodeClass- Returns:
- implemented interface types
-
getMethods
List<? extends INativeMethodItem> getMethods()Description copied from interface:ICodeClassGet the list of methods that are defined in this class (super methods are not returned).- Specified by:
getMethodsin interfaceICodeClass- Returns:
- a list of methods, possibly empty if this class has no implementation
-
getFields
List<? extends INativeFieldItem> getFields()Description copied from interface:ICodeClassGet the list of fields that are defined in this class (super fields are not returned).- Specified by:
getFieldsin interfaceICodeClass- Returns:
- a list of fields, possibly empty if this class has no implementation
-
getSubtypes
List<? extends INativeType> getSubtypes()Retrieve direct native subtypes.- Returns:
- native subtypes
-
getVirtualTables
List<? extends IMethodTable> getVirtualTables()Retrieve virtual method tables.- Returns:
- virtual tables
-
getVirtualMethods
Get the virtual methods of this class, including or not the virtual methods defined in parent classes that were not overridden (and therefore, indirectly belonging to this class as well).- Parameters:
onlyDefinedInThisClass- true to return only virtual methods defined in this class- Returns:
- virtual methods
-
getNonVirtualMethods
List<? extends INativeMethodItem> getNonVirtualMethods()Get the non-virtual, non-static methods of this class.- Returns:
- non-virtual methods
-
getStaticMethods
List<? extends INativeMethodItem> getStaticMethods()Get the static methods of this class.- Returns:
- static methods
-
getInstanceMethods
List<? extends INativeMethodItem> getInstanceMethods()Get the instance methods defined in this class. (Virtual methods defined in parent classes are not included.) Not all instance methods may be virtual.- Returns:
- instance methods
-
getConstructors
List<? extends INativeMethodItem> getConstructors()Retrieve constructors.- Returns:
- constructors
-
getDestructors
List<? extends INativeMethodItem> getDestructors()Retrieve destructors.- Returns:
- destructors
-
getInstanceFields
List<? extends INativeFieldItem> getInstanceFields()Retrieve instance fields.- Returns:
- instance fields
-
getStaticFields
List<? extends INativeFieldItem> getStaticFields()Retrieve static fields.- Returns:
- static fields
-
getVirtualMethodFromCoordinates
Retrieve a virtual method by coordinates.- Parameters:
tableIndex- virtual table indexmethodIndex- method index within the virtual table- Returns:
- virtual method, or null
-
getCoordinatesOfVirtualMethod
Retrieve virtual method coordinates.- Parameters:
method- virtual method- Returns:
- table and method indexes, or null
-
renameVirtualMethod
Rename a virtual method.- Parameters:
method- virtual methodname- new name- Returns:
- true if the method was renamed
-
collectVirtualMethodOverrides
boolean collectVirtualMethodOverrides(INativeMethodItem method, Collection<INativeMethodItem> overUp, Collection<INativeMethodItem> overDown) Collect methods overriding or overridden by a virtual method.- Parameters:
method- virtual methodoverUp- output collection for overridden ancestorsoverDown- output collection for overriding descendants- Returns:
- true if collection completed
-