public interface

IJavaIdentifier

implements IJavaLeftExpression
com.pnfsoftware.jeb.core.units.code.java.IJavaIdentifier

Class Overview

Java AST interface to represent a Java identifier, or variable.

Example:

 int someVariable = 3;
     ^^^^^^^^^^^^
 

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
Public Methods
abstract IJavaIdentifier duplicate()
Duplicate this element.
abstract void generate(JavaOutputSink out, boolean definition)
Custom AST code generator that allows specifying whether the generation of this identifier is part of its initial definition.
abstract String getDebugName()
Get the identifier's debug name, if any was provided.
abstract IJavaDefinition getDefinition()
Get this identifier's definition statement.
abstract String getGeneratedName(JavaOutputSink sink)
Retrieve the actual identifier name that would be generated to the provided sink.
abstract String getGeneratedType(JavaOutputSink sink)
Retrieve the actual type name that would be generated to the provided sink.
abstract String getName()
Get the identifier original name.
abstract IJavaType getType()
Get this identifier's type.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaExpression
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaLeftExpression

Public Methods

public abstract IJavaIdentifier duplicate ()

Duplicate this element.

Returns
  • a (possibly) duplicated object of the same type

public abstract void generate (JavaOutputSink out, boolean definition)

Custom AST code generator that allows specifying whether the generation of this identifier is part of its initial definition.

Parameters
definition true if this identifier is generated by its containing IJavaDefinition element

public abstract String getDebugName ()

Get the identifier's debug name, if any was provided.

In order to retrieve the current (effective) name, use getIdentifierName(IJavaIdentifier).

Returns
  • the debug name, null if none was provided

public abstract IJavaDefinition getDefinition ()

Get this identifier's definition statement.

public abstract String getGeneratedName (JavaOutputSink sink)

Retrieve the actual identifier name that would be generated to the provided sink.

public abstract String getGeneratedType (JavaOutputSink sink)

Retrieve the actual type name that would be generated to the provided sink.

public abstract String getName ()

Get the identifier original name.

In order to retrieve the current (effective) name, use getIdentifierName(IJavaIdentifier).

Returns
  • the original (not necessarily current) name, never null

public abstract IJavaType getType ()

Get this identifier's type.