public interface

ICMethod

implements ICDecompilableElement
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICMethod

Class Overview

AST method objects are top-level AST objects that can be retrieved by a ICMethodFactory.

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICDecompilableElement
Public Methods
abstract void addParameter(int index, ICDecl param)
abstract void addParameter(ICDecl param)
abstract void addStatement(ICStatement stm)
abstract boolean deleteStatement(ICStatement stm)
Delete a statement by reference.
abstract ICMethod duplicate()
Deep duplication of the element (i.e.
abstract void fromFlatList(List<ICStatement> list)
Regenerate the AST of this method based on a flat list of statements and pseudo-statements.
abstract void generateName(COutputSink out, boolean definition)
abstract ICBlock getBody()
abstract ICType getClassType()
abstract ICIdentifierManager getIdentifierManager()
Retrieve this method's identifier manager (local variable factory).
abstract ICLabelFactory getLabelFactory()
Retrieve this method's label factory.
abstract ICStatement getLastStatement()
abstract String getName()
abstract List<ICDecl> getParameters()
abstract ICType getReturnType()
Retrieve the primary return type, or the void type if this method does not return anything.
abstract List<ICType> getReturnTypes()
abstract List<ICStatement> getStatements()
Walk the tree and get the ordered list of all (non-pseudo) statements that make up the method.
abstract boolean insertAtOffset(long offset, ICStatement stm)
abstract boolean isEmpty()
abstract void removeParameter(int index)
abstract List<ICStatement> toFlatList()
Flatten the abstract syntax tree.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICDecompilableElement
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICSourceElement

Public Methods

public abstract void addParameter (int index, ICDecl param)

public abstract void addParameter (ICDecl param)

public abstract void addStatement (ICStatement stm)

public abstract boolean deleteStatement (ICStatement stm)

Delete a statement by reference.

Parameters
stm the statement to delete
Returns
  • true if the statement was found and deleted

public abstract ICMethod duplicate ()

Deep duplication of the element (i.e. sub-elements are duplicated).

Note: ICClass, ICMethod, ICField, ICIdentifier, ICConstant, ICType and ICLabel are not duplicated.

public abstract void fromFlatList (List<ICStatement> list)

Regenerate the AST of this method based on a flat list of statements and pseudo-statements.

Parameters
list the list of all statements (including pseudo-statements) that make up the method

public abstract void generateName (COutputSink out, boolean definition)

public abstract ICBlock getBody ()

public abstract ICType getClassType ()

public abstract ICIdentifierManager getIdentifierManager ()

Retrieve this method's identifier manager (local variable factory).

public abstract ICLabelFactory getLabelFactory ()

Retrieve this method's label factory.

public abstract ICStatement getLastStatement ()

public abstract String getName ()

public abstract List<ICDecl> getParameters ()

public abstract ICType getReturnType ()

Retrieve the primary return type, or the void type if this method does not return anything. The primary return type, if not void, is the first element returned by getReturnTypes().

Returns
  • never null

public abstract List<ICType> getReturnTypes ()

public abstract List<ICStatement> getStatements ()

Walk the tree and get the ordered list of all (non-pseudo) statements that make up the method.

public abstract boolean insertAtOffset (long offset, ICStatement stm)

public abstract boolean isEmpty ()

public abstract void removeParameter (int index)

public abstract List<ICStatement> toFlatList ()

Flatten the abstract syntax tree. The returned list contains extra statements, called "pseudo-statements", needed to represent the structure of the method.
In programmer's words, all statements implementing ICoumpound in the AST are replaced by two or more appropriate objects deriving from PseudoStatement.

Returns
  • the list of all statements (including pseudo-statements) that make up the method