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 IJavaFactories getFactories()
Get an AST element builder.
abstract String getIdentifierName(IJavaIdentifier ident)
Retrieve the effective (renamed) name of an identifier in this method's AST.
abstract int optimize()
Convenience method used to run an additional pass of standard (built-in) AST optimizations.
abstract boolean setIdentifierName(IJavaIdentifier ident, String name)
Rename an identifier.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.IUnitCreator
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 IJavaFactories getFactories ()

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

Returns
  • a builder, null if not implemented

public abstract String getIdentifierName (IJavaIdentifier ident)

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

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)

Rename an identifier.