# Interface: com.pnfsoftware.jeb.core.units.code.java.IJavaCompound

Java AST interface to represent compound statements. 

 Compound statements contain more statements, laid out in [blocks](IJavaBlock). A block is the simplest type of compound. Compounds include if\-conditionals, loops, switches, etc.

## Method: duplicate
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaCompound`


## Method: generateFlatList
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaStatement>`

Description: Generate a flat list of AST and pseudo\-AST elements that make up this block. This function allows the caller to get a flat representation of the AST, much like a programmer would view a source code. Note that the statements returned can be pseudo statements, ie, they're not real statements. For example, a flat view of a conditional block would return pseudo\-statements to represent the "if" line, the "else if" lines, and the "else" line.
return: a list of statements and pseudo\-statements

## Method: getBlocks
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaBlock>`

Description: Get the list of blocks contained in this compound. 

 Caveat: if this compound is a block itself, the returned list is not empty, it contains self.
return: the list of blocks

## Method: getSubElements
- parameter: `excludeSubBlocks`, type: `boolean`
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaElement>`

Description: This specialized version of [#getSubElements()](#getSubElements()) allows the caller to exclude collecting sub\-blocks of this compound.
parameter: excludeSubBlocks: 
return: 

## Method: insertAt
- parameter: `target_offset`, type: `int`
- parameter: `insert_stm`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`
- return type: `boolean`

Description: Insert a statement at a particular offset within the AST. This function recurses down the AST tree, inside the blocks, to find the exact location where the statement should be inserted.
parameter: target_offset: 
parameter: insert_stm: 
return: 

## Method: reset

Description: Reset the compound. Internal use.

