public interface

IJavaSourceUnit

implements ISourceUnit
com.pnfsoftware.jeb.core.units.code.java.IJavaSourceUnit

Class Overview

Definition of a source unit representing a Java class in the form of an Abstract Syntax Tree.

Note: the PNF Software's native Dalvik decompiler returns Java source units that implement this interface.

Summary

Public Methods
abstract IJavaClass getClassElement()
Get a reference to the Java class defined in this unit.
abstract IDexDecompilerUnit getDecompiler()
Get the decompiler unit (possibly the parent, possibly null) that generated this unit.
abstract IJavaFactories getFactories()
This method is deprecated. use getASTFactories() instead
abstract String getIdentifierName(IJavaIdentifier ident)
This method is deprecated. use getIdentifierName(IJavaIdentifier) instead
abstract int optimize()
Convenience method used to run an additional pass of standard (built-in) AST optimizations.
abstract boolean setIdentifierName(IJavaIdentifier ident, String name)
This method is deprecated. use setIdentifierName(IJavaIdentifier, String) instead
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.IUnitCreator
From interface com.pnfsoftware.jeb.core.IUserDataSupport
From interface com.pnfsoftware.jeb.core.units.IAddressableUnit
From interface com.pnfsoftware.jeb.core.units.IInteractiveUnit
From interface com.pnfsoftware.jeb.core.units.IUnit
From interface com.pnfsoftware.jeb.core.units.code.ISourceUnit
From interface com.pnfsoftware.jeb.util.events.IEventSource

Public Methods

public abstract IJavaClass getClassElement ()

Get a reference to the Java class defined in this unit.

Returns
  • the AST class element for the class represented by this unit

public abstract IDexDecompilerUnit getDecompiler ()

Get the decompiler unit (possibly the parent, possibly null) that generated this unit.

Returns
  • a decompiler unit, possibly null

public abstract IJavaFactories getFactories ()

This method is deprecated.
use getASTFactories() instead

Get an AST element builder. The builder is used to create new AST elements, which can then be inserted in an existed AST. Convenience method.

public abstract String getIdentifierName (IJavaIdentifier ident)

This method is deprecated.
use getIdentifierName(IJavaIdentifier) instead

Retrieve the effective (renamed) name of an identifier in this method's AST. Convenience method.

public abstract int optimize ()

Convenience method used to run an additional pass of standard (built-in) AST optimizations.

public abstract boolean setIdentifierName (IJavaIdentifier ident, String name)

This method is deprecated.
use setIdentifierName(IJavaIdentifier, String) instead

Rename an identifier. Convenience method.