public class

DFormattingContext

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext

Class Overview

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.

Summary

Public Constructors
DFormattingContext()
Create a default formatting context.
DFormattingContext(IDMethodContext ctx)
Create a default formatting context.
Public Methods
void angle()
Convenience method to append an opening angle bracket (less-than sign) to this sink.
void angleClose()
Convenience method to append a closing angle bracket (greater-than sign) to this sink.
DFormattingContext append(String str)
Append a string to this sink.
DFormattingContext append(char c)
Append a character to this sink.
DFormattingContext append(Object o)
Append the string representation of an object to this sink.
DFormattingContext append(int i)
Append an integer in base 10 to this sink.
DFormattingContext appendFormat(String format, Object... args)
Append a formatted string to this sink.
void appendFormattedType(IJavaType type)
Append a type to this sink.
void appendFormattedTypeIf(IJavaType type)
Append a type to this sink if types are to be rendered (see isDisplayTypes()).
void brace()
Convenience method to append an opening brace to this sink.
void braceClose()
Convenience method to append a closing brace to this sink.
void bracket()
Convenience method to append an opening bracket to this sink.
void bracketClose()
Convenience method to append a closing bracket to this sink.
IDMethodContext getMethodContext()
boolean isDisplayCanThrow()
boolean isDisplayTypes()
boolean isUsePreferredNames()
void paren()
Convenience method to append an opening parenthesis to this sink.
void parenClose()
Convenience method to append a closing parenthesis to this sink.
void setDisplayCanThrow(boolean displayCanThrow)
void setDisplayTypes(boolean displayTypes)
void setMethodContext(IDMethodContext ctx)
void setUsePreferredNames(boolean usePreferredNames)
void space()
Convenience method to append a space to this sink.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DFormattingContext ()

Create a default formatting context. IR types are rendered.

public DFormattingContext (IDMethodContext ctx)

Create a default formatting context. IR types are rendered.

Parameters
ctx optional method context; needed to fetch pool objects (e.g. strings) or fetch effective data

Public Methods

public void angle ()

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

public void angleClose ()

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

public DFormattingContext append (String str)

Append a string to this sink.

Returns
  • this sink

public DFormattingContext append (char c)

Append a character to this sink.

Returns
  • this sink

public DFormattingContext append (Object o)

Append the string representation of an object to this sink.

Parameters
o optional (if null, the 'null' string is appended)
Returns
  • this sink

public DFormattingContext append (int i)

Append an integer in base 10 to this sink.

Returns
  • this sink

public DFormattingContext appendFormat (String format, Object... args)

Append a formatted string to this sink.

Parameters
format format string
args arguments for the format string
Returns
  • this sink

public void appendFormattedType (IJavaType type)

Append a type to this sink.

public void appendFormattedTypeIf (IJavaType type)

Append a type to this sink if types are to be rendered (see isDisplayTypes()). Else, do nothing.

public void brace ()

Convenience method to append an opening brace to this sink.

public void braceClose ()

Convenience method to append a closing brace to this sink.

public void bracket ()

Convenience method to append an opening bracket to this sink.

public void bracketClose ()

Convenience method to append a closing bracket to this sink.

public IDMethodContext getMethodContext ()

public boolean isDisplayCanThrow ()

public boolean isDisplayTypes ()

public boolean isUsePreferredNames ()

public void paren ()

Convenience method to append an opening parenthesis to this sink.

public void parenClose ()

Convenience method to append a closing parenthesis to this sink.

public void setDisplayCanThrow (boolean displayCanThrow)

public void setDisplayTypes (boolean displayTypes)

public void setMethodContext (IDMethodContext ctx)

Parameters
ctx optional method context; needed to fetch pool objects (e.g. strings) or fetch effective data

public void setUsePreferredNames (boolean usePreferredNames)

public void space ()

Convenience method to append a space to this sink.

public String toString ()