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

Java AST interface to represent a Java method.

## Method: deleteStatement
- parameter: `stm`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`
- return type: `boolean`

Description: Delete a statement by reference. This method performs a deep search within the entire method. This works because no method should contain the same statement \(in the sense, same reference\) twice.
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.java.IJavaMethod`


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

Description: 
parameter: list: 

## Method: generate
- parameter: `out`, type: `com.pnfsoftware.jeb.core.units.code.java.JavaOutputSink`
- parameter: `bodyOnly`, type: `boolean`


## Method: generate
- parameter: `out`, type: `com.pnfsoftware.jeb.core.units.code.java.JavaOutputSink`
- parameter: `genkind`, type: `int`

Description: 
parameter: out: 
parameter: genkind: 0= regular method; 1= just the body of the method; 2= the method is a lambda

## Method: getAccessFlags
- return type: `int`


## Method: getAnonymousClassSignatures
- return type: `java.util.List<java.lang.String>`

Description: 
return: 

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

Description: 
return: 

## Method: getBody
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`

Description: Get the body of the method.
return: the body, null if none

## Method: getClassType
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`

Description: Get the type of the entity containing this method.
return: 

## Method: getDefaultValue
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`

Description: Get the default value provided by this method if there is one.
implementation note: currently used for annotation types only: if this object is an annotation method           \(i.e. it represents an attribute of an annotation type\), this method will return           the default value associated to this attribute, if there is one
return: a default value or null

## Method: getIdentifierManager
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaIdentifierManager`

Description: 
return: 

## Method: getIndexOfFirstVisibleParameter
- return type: `int`

Description: 
return: 

## Method: getInnerClassSignatures
- return type: `java.util.List<java.lang.String>`

Description: 
return: 

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

Description: 
return: 

## Method: getLabelFactory
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaLabelFactory`

Description: 
return: 

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

Description: 
return: 

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

Description: Get the original method name. The returned name is a simple name, without parameter, return, or type information.
return: the method name

## Method: getParameter
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaDefinition`

Description: 
parameter: index: 
return: 

## Method: getParameterAnnotations
- parameter: `index`, type: `int`
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaAnnotation>`

Description: 
return: 

## Method: getParameterCount
- return type: `int`

Description: 
return: 

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

Description: Get the parameters of the method. 

 Note: If the method is non\-static, the first parameter in the list would be \`this\`.
return: the list of parameters

## Method: getReturnType
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`

Description: Get the return type of the method.
return: the return type

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

Description: Get the original method signature.
return: the method signature

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

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

## Method: getVisibleParameterCount
- return type: `int`

Description: 
return: 

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


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


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


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


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


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

Description: 
return: 

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


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


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


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


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


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


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

Description: Determine whether this method is a static method.
return: true if the method is static, false otherwise \(virtual method\)

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


## Method: markSecondParameterOuterClassReference


## Method: setDefaultValue
- parameter: `defaultValue`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`


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


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

Description: 
return: 

