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

A collection of Java AST element factories.

## Method: createAnnotation
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `elts`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaAnnotationElement>`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaAnnotation`

Description: Create an annotation.
parameter: type: annotation type
parameter: elts: annotation elements
return: annotation

## Method: createAnnotationElement
- parameter: `name`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaConstant`
- parameter: `value`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaAnnotationElement`

Description: Create an annotation element.
parameter: name: element name
parameter: value: element value
return: annotation element

## Method: createArrayElt
- parameter: `array`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `index`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaArrayElt`

Description: Create an array element expression.
parameter: array: array expression
parameter: index: index expression
return: array element expression

## Method: createAssignment
- parameter: `left`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaLeftExpression`
- parameter: `right`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaAssignment`

Description: Create an assignment statement.
parameter: left: left\-side expression
parameter: right: right\-side expression
return: assignment statement

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

Description: Create an empty block.
return: block

## Method: createBlock
- parameter: `firstStatement`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`

Description: Create a block containing an initial statement.
parameter: firstStatement: first statement
return: block

## Method: createBreak
- parameter: `label`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaLabel`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBreak`

Description: Create a break statement.
parameter: label: optional target label
return: break statement

## Method: createCall
- parameter: `m`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`
- parameter: `calltype`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaCall`

Description: Create a call expression.
parameter: m: method reference
parameter: calltype: call type
return: call expression

## Method: createCall
- parameter: `msig`, type: `java.lang.String`
- parameter: `calltype`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaCall`

Description: Create a call expression.
parameter: msig: method signature
parameter: calltype: call type
return: call expression

## Method: createCall
- parameter: `m`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`
- parameter: `calltype`, type: `int`
- parameter: `argument`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaExpression>`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaCall`

Description: Create a call expression.
parameter: m: method reference
parameter: calltype: call type
parameter: argument: arguments
return: call expression

## Method: createCall
- parameter: `msig`, type: `java.lang.String`
- parameter: `calltype`, type: `int`
- parameter: `argument`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaExpression>`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaCall`

Description: Create a call expression.
parameter: msig: method signature
parameter: calltype: call type
parameter: argument: arguments
return: call expression

## Method: createCastOperation
- parameter: `castType`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `exp`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperation`

Description: Create a cast operation.
parameter: castType: target type
parameter: exp: expression to cast
return: cast operation

## Method: createConditionalExpression
- parameter: `left`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `right0`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `right1`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaConditionalExpression`

Description: Create a conditional expression.
parameter: left: predicate expression
parameter: right0: expression used when the predicate is true
parameter: right1: expression used when the predicate is false
return: conditional expression

## Method: createContinue
- parameter: `label`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaLabel`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaContinue`

Description: Create a continue statement.
parameter: label: optional target label
return: continue statement

## Method: createDoWhile
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaPredicate`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaDoWhile`

Description: Create a do\-while statement.
parameter: b: loop body
parameter: p: loop predicate
return: do\-while statement

## Method: createFieldReference
- parameter: `fsig`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaField`

Description: Create a field reference.
parameter: fsig: field signature
return: field reference

## Method: createFieldReference
- parameter: `fsig`, type: `java.lang.String`
- parameter: `hintStaticField`, type: `java.lang.Boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaField`

Description: Create a field reference.
parameter: fsig: field signature
parameter: hintStaticField: optional static\-field hint
return: field reference

## Method: createFor
- parameter: `pre`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaPredicate`
- parameter: `post`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaFor`

Description: Create a for statement.
parameter: pre: initializer statement
parameter: p: loop predicate
parameter: post: post\-iteration statement
parameter: b: loop body
return: for statement

## Method: createForEach
- parameter: `var`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaDefinition`
- parameter: `iterable`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaForEach`

Description: Create a for\-each statement.
parameter: var: iteration variable definition
parameter: iterable: iterable expression
parameter: b: loop body
return: for\-each statement

## Method: createGoto
- parameter: `label`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaLabel`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaGoto`

Description: Create a goto statement.
parameter: label: target label
return: goto statement

## Method: createIf
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaPredicate`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaIf`

Description: Create an if statement.
parameter: p: predicate
parameter: b: true branch block
return: if statement

## Method: createInstanceField
- parameter: `instance`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `fsig`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaInstanceField`

Description: Create an instance\-field expression.
parameter: instance: instance expression
parameter: fsig: field signature
return: instance\-field expression

## Method: createInstanceField
- parameter: `instance`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `field`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaField`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaInstanceField`

Description: Create an instance\-field expression.
parameter: instance: instance expression
parameter: field: field reference
return: instance\-field expression

## Method: createMethodReference
- parameter: `msig`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`

Description: Create a method reference.
parameter: msig: method signature
return: method reference

## Method: createMethodReference
- parameter: `msig`, type: `java.lang.String`
- parameter: `hintStaticMethod`, type: `java.lang.Boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`

Description: Create a method reference.
parameter: msig: method signature
parameter: hintStaticMethod: optional static\-method hint
return: method reference

## Method: createMonitor
- parameter: `enter`, type: `boolean`
- parameter: `lock`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMonitor`

Description: Create a monitor statement.
parameter: enter: true for monitor\-enter, false for monitor\-exit
parameter: lock: lock expression
return: monitor statement

## Method: createNew
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `method`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaNew`

Description: Create a new\-instance expression.
parameter: type: instantiated type
parameter: method: constructor method
return: new\-instance expression

## Method: createNew
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `method`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMethod`
- parameter: `arguments`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaExpression>`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaNew`

Description: Create a new\-instance expression.
parameter: type: instantiated type
parameter: method: constructor method
parameter: arguments: constructor arguments
return: new\-instance expression

## Method: createNew
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `msig`, type: `java.lang.String`
- parameter: `arguments`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaExpression>`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaNew`

Description: Create a new\-instance expression.
parameter: type: instantiated type
parameter: msig: constructor method signature
parameter: arguments: constructor arguments
return: new\-instance expression

## Method: createNewArray
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `size`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaNewArray`

Description: Create a new\-array expression with one size expression.
parameter: type: array type
parameter: size: array size expression
return: new\-array expression

## Method: createNewArray
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `areSizes`, type: `boolean`
- parameter: `sizesOrInits`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.java.IJavaExpression>`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaNewArray`

Description: Create a new\-array expression.
parameter: type: array type
parameter: areSizes: true if the list contains size expressions; false if it contains initializers
parameter: sizesOrInits: size expressions or initializer expressions
return: new\-array expression

## Method: createOperation
- parameter: `left`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `operator`, type: `com.pnfsoftware.jeb.core.units.code.java.JavaOperatorType`
- parameter: `right`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperation`

Description: Create an operation expression.
parameter: left: left operand
parameter: operator: operator type
parameter: right: right operand
return: operation expression

## Method: createOperation
- parameter: `left`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `operator`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperator`
- parameter: `right`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperation`

Description: Create an operation expression.
parameter: left: left operand
parameter: operator: operator
parameter: right: right operand
return: operation expression

## Method: createPredicate
- parameter: `exp`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaPredicate`

Description: Create a predicate wrapper.
parameter: exp: predicate expression
return: predicate

## Method: createReturn
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaReturn`

Description: Create a return statement without expression.
return: return statement

## Method: createReturn
- parameter: `e`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaReturn`

Description: Create a return statement with an expression.
parameter: e: returned expression
return: return statement

## Method: createStaticField
- parameter: `classType`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `fsig`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStaticField`

Description: Create a static\-field expression.
parameter: classType: owner class type
parameter: fsig: field signature
return: static\-field expression

## Method: createStaticField
- parameter: `classType`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- parameter: `field`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaField`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStaticField`

Description: Create a static\-field expression.
parameter: classType: owner class type
parameter: field: field reference
return: static\-field expression

## Method: createSwitch
- parameter: `e`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaSwitch`

Description: Create a switch statement.
parameter: e: switched expression
return: switch statement

## Method: createSwitch
- parameter: `e`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `switchType`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaSwitch`

Description: Create a switch statement.
parameter: e: switched expression
parameter: switchType: switch type
return: switch statement

## Method: createSynchronizedBlock
- parameter: `lock`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaSynchronizedBlock`

Description: Create a synchronized block.
parameter: lock: lock expression
parameter: b: block body
return: synchronized block

## Method: createThrow
- parameter: `throwable`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaThrow`

Description: Create a throw statement.
parameter: throwable: thrown expression
return: throw statement

## Method: createTry
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaTry`

Description: Create a try statement.
parameter: b: try body
return: try statement

## Method: createTypeReference
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaTypeReference`

Description: Create a type\-reference expression.
parameter: type: referenced type
return: type\-reference expression

## Method: createWhile
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaPredicate`
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaWhile`

Description: Create a while statement.
parameter: p: loop predicate
parameter: b: loop body
return: while statement

