# Interface: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICMethod

C AST method objects are top\-level AST objects that can be retrieved by a [ICMethodFactory](ICMethodFactory).

## Method: addParameter
- parameter: `param`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICDecl`


## Method: addParameter
- parameter: `index`, type: `int`
- parameter: `param`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICDecl`


## Method: addStatement
- parameter: `stm`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement`


## Method: deleteStatement
- parameter: `stm`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement`
- return type: `boolean`

Description: Delete a statement by reference.
parameter: stm: the statement to delete
return: true if the statement was found and deleted

## Method: duplicate
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICMethod`


## Method: fromFlatList
- parameter: `list`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement>`

Description: Regenerate the AST of this method based on a flat list of statements and pseudo\-statements.
parameter: list: the list of all statements \(including pseudo\-statements\) that make up the method

## Method: generateName
- parameter: `out`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.COutputSink`
- parameter: `definition`, type: `boolean`


## Method: getBody
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICBlock`


## Method: getClassType
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICType`


## Method: getIdentifierManager
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICIdentifierManager`

Description: Retrieve this method's identifier manager \(local variable factory\).
return: 

## Method: getLabelFactory
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICLabelFactory`

Description: Retrieve this method's label factory.
return: 

## Method: getLastStatement
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement`


## Method: getName
- return type: `java.lang.String`


## Method: getParameters
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICDecl>`

Description: 
return: 

## Method: getReturnType
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICType`

Description: 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()](#getReturnTypes()).
return: never null

## Method: getReturnTypes
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICType>`


## Method: getStatements
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement>`

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

## Method: insertAtOffset
- parameter: `offset`, type: `long`
- parameter: `stm`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement`
- return type: `boolean`


## Method: isEmpty
- return type: `boolean`


## Method: removeParameter
- parameter: `index`, type: `int`


## Method: toFlatList
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement>`

Description: 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.
return: the list of all statements \(including pseudo\-statements\) that make up the method

## Method: visitStatements
- parameter: `visitor`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICVisitor`
- return type: `boolean`

Description: Visit all [statements](ICStatement) of the method's body recursively. This method differs from [#getStatements()](#getStatements()), which simply returns the list of statements contained in the body, but not the statements contained in the statements.
parameter: visitor: a visitor object
return: the success code

