# Class: com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext

`dexdec` IR formatting context, providing an output sink and specifications for the output. Plugin codes may want to use a formatting context to generate and customize rendering of the IR. In most cases, the writing methods like `append()`, `space()`, etc. will not be needed by plugins.

## Constructor: DFormattingContext

Description: Create a default formatting context. IR types are rendered.

## Constructor: DFormattingContext
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`

Description: Create a default formatting context. IR types are rendered.
parameter: ctx: optional method context; needed to fetch pool objects \(e.g. strings\) or fetch            effective data

## Method: angle

Description: Convenience method to append an opening angle bracket \(less\-than sign\) to this sink.

## Method: angleClose

Description: Convenience method to append a closing angle bracket \(greater\-than sign\) to this sink.

## Method: append
- parameter: `o`, type: `java.lang.Object`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext`

Description: Append the string representation of an object to this sink.
parameter: o: optional \(if null, the 'null' string is appended\)
return: this sink

## Method: append
- parameter: `str`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext`

Description: Append a string to this sink.
parameter: str: string to append
return: this sink

## Method: append
- parameter: `i`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext`

Description: Append an integer in base 10 to this sink.
parameter: i: integer to append
return: this sink

## Method: append
- parameter: `c`, type: `char`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext`

Description: Append a character to this sink.
parameter: c: character to append
return: this sink

## Method: appendFormat
- parameter: `format`, type: `java.lang.String`
- parameter: `args`, type: `java.lang.Object[]`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext`

Description: Append a formatted string to this sink.
parameter: format: format string
parameter: args: arguments for the format string
return: this sink

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

Description: Append a type to this sink.
parameter: type: type to append

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

Description: Append a type to this sink if types are to be rendered \(see [#isDisplayTypes()](#isDisplayTypes())\). Else, do nothing.
parameter: type: type to append

## Method: brace

Description: Convenience method to append an opening brace to this sink.

## Method: braceClose

Description: Convenience method to append a closing brace to this sink.

## Method: bracket

Description: Convenience method to append an opening bracket to this sink.

## Method: bracketClose

Description: Convenience method to append a closing bracket to this sink.

## Method: getMethodContext
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`

Description: Retrieve the method context used during formatting.
return: the method context, or null if none is set

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

Description: Determine whether may\-throw markers should be displayed.
return: true if may\-throw markers are displayed

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

Description: Determine whether types should be displayed.
return: true if types are displayed

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

Description: Determine whether preferred names should be used when formatting.
return: true if preferred names are enabled

## Method: paren

Description: Convenience method to append an opening parenthesis to this sink.

## Method: parenClose

Description: Convenience method to append a closing parenthesis to this sink.

## Method: setDisplayCanThrow
- parameter: `displayCanThrow`, type: `boolean`

Description: Set whether may\-throw markers should be displayed.
parameter: displayCanThrow: true to display may\-throw markers

## Method: setDisplayTypes
- parameter: `displayTypes`, type: `boolean`

Description: Set whether types should be displayed.
parameter: displayTypes: true to display types

## Method: setMethodContext
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext`

Description: Set the method context used during formatting.
parameter: ctx: optional method context; needed to fetch pool objects \(e.g. strings\) or fetch            effective data

## Method: setUsePreferredNames
- parameter: `usePreferredNames`, type: `boolean`

Description: Set whether preferred names should be used when formatting.
parameter: usePreferredNames: true to use preferred names

## Method: space

Description: Convenience method to append a space to this sink.

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


