Interface Indexable

All Known Subinterfaces:
Pointer, Stmt
All Known Implementing Classes:
ArrayIndex, ArrayIndexNode, AssignLiteral, AssignStmt, Binary, Cast, Catch, ConstantObj, Copy, CSMethod, CSObj, CSVar, DefinitionStmt, FieldStmt, Goto, If, InstanceField, InstanceFieldNode, InstanceNode, InstanceOf, Invoke, JClass, JumpStmt, LoadArray, LoadField, LookupSwitch, MergedObj, MockObj, Monitor, New, NewObj, Node, Nop, Obj, Return, StaticField, StaticFieldNode, StoreArray, StoreField, SwitchStmt, TableSwitch, Throw, Unary, Var, VarNode

public interface Indexable
The instances of the classes that implement this interface can provide a unique non-negative index, so that they can be stored in efficient data structures (e.g., bit set).

Note that the index of each object might NOT be globally unique, when the indexes are unique within certain scope (e.g., the indexes of local variables are unique only in the same method), and thus the client code should use the indexes carefully.

  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
  • Method Details

    • getIndex

      int getIndex()
      Returns:
      index of this object. The index should be a non-negative integer.