public interface

IJavaOperator

com.pnfsoftware.jeb.core.units.code.java.IJavaOperator

Class Overview

This interface is used to define a Java operator.

Summary

Public Methods
abstract IJavaType getCastType()
Return the cast type of a cast operator.
abstract JavaOperatorType getOperatorType()
Get the type of operator represented by this object.
abstract boolean isArithmetic()
Determine if the operator is an arithmetic operator.
abstract boolean isBinary()
Determine if the operator uses two operands.
abstract boolean isCast()
Determine if the operator is a cast operator.
abstract boolean isLogical()
Determine if the operator is a logical operator, ie one that evaluates to true or false.
abstract boolean isUnary()
Determine if the operator uses a single operand.
abstract String toString()
Provide a textual representation of the operator.

Public Methods

public abstract IJavaType getCastType ()

Return the cast type of a cast operator. This method will throw if the operator is not a cast operator. Use isCast() first.

Returns
  • the cast-to object type

public abstract JavaOperatorType getOperatorType ()

Get the type of operator represented by this object.

public abstract boolean isArithmetic ()

Determine if the operator is an arithmetic operator.

Returns
  • true if the operator is an arithmetic operator

public abstract boolean isBinary ()

Determine if the operator uses two operands.

Returns
  • true if the operator is a binary operator

public abstract boolean isCast ()

Determine if the operator is a cast operator.

public abstract boolean isLogical ()

Determine if the operator is a logical operator, ie one that evaluates to true or false.

public abstract boolean isUnary ()

Determine if the operator uses a single operand.

Returns
  • true if the operator is a unary operator

public abstract String toString ()

Provide a textual representation of the operator.