public interface

IJavaSourceUnit

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

Class Overview

Definition of a source unit representing a Java class or Java method in the form of an Abstract Syntax Tree (AST).

Summary

Public Methods
abstract IJavaElement getASTElement()
Get a reference to the Java class or method defined in this unit.
abstract IJavaClass getClassElement()
This method is deprecated. use getASTElement()
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 IJavaElement getASTElement ()

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

public abstract IJavaClass getClassElement ()

This method is deprecated.
use getASTElement()

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.