Subroutine (jakarta-bcel 5.2 API)
Keywords: org.apache.bcel.verifier.structurals.Subroutine interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.bcel.verifier.structurals
Interface Subroutine

    public interface Subroutine

This interface defines properties of JVM bytecode subroutines. Note that it is 'abused' to maintain the top-level code in a consistent fashion, too.

Version:
  $Id: Subroutine.java 371539 2006-01-23 14:08:00Z tcurdt $

Method Summary
`boolean` | `contains(InstructionHandle inst)` Returns if the given InstructionHandle refers to an instruction that is part of this subroutine.
`int[]` | `getAccessedLocalsIndices()` Returns an int[] containing the indices of the local variable slots accessed by this Subroutine (read-accessed, write-accessed or both); local variables referenced by subroutines of this subroutine are not included.
`InstructionHandle[]` | `getEnteringJsrInstructions()` Returns all the JsrInstructions that have the first instruction of this subroutine as their target.
`InstructionHandle[]` | `getInstructions()` Returns all instructions that together form this subroutine.
`InstructionHandle` | `getLeavingRET()` Returns the one and only RET that leaves the subroutine.
`int[]` | `getRecursivelyAccessedLocalsIndices()` Returns an int[] containing the indices of the local variable slots accessed by this Subroutine (read-accessed, write-accessed or both); local variables referenced by subroutines of this subroutine are included.
`Subroutine[]` | `subSubs()` Returns the subroutines that are directly called from this subroutine.

Method Detail

### getEnteringJsrInstructions

    InstructionHandle[] getEnteringJsrInstructions()

  Returns all the JsrInstructions that have the first instruction of this subroutine as their target. Must not be invoked on the 'top-level subroutine'.

### getLeavingRET

    InstructionHandle getLeavingRET()

  Returns the one and only RET that leaves the subroutine. Note that JustIce has a pretty rigid notion of a subroutine. Must not be invoked on the 'top-level subroutine'.

  See Also:
    `Subroutines`

### getInstructions

    InstructionHandle[] getInstructions()

  Returns all instructions that together form this subroutine. Note that an instruction is part of exactly one subroutine (the top-level code is considered to be a special subroutine) - else it is not reachable at all (dead code).

### contains

    boolean contains(InstructionHandle inst)

  Returns if the given InstructionHandle refers to an instruction that is part of this subroutine. This is a convenience method that saves iteration over the InstructionHandle objects returned by getInstructions().

  See Also:
    `getInstructions()`

### getAccessedLocalsIndices

    int[] getAccessedLocalsIndices()

  Returns an int[] containing the indices of the local variable slots accessed by this Subroutine (read-accessed, write-accessed or both); local variables referenced by subroutines of this subroutine are not included.

  See Also:
    `getRecursivelyAccessedLocalsIndices()`

### getRecursivelyAccessedLocalsIndices

    int[] getRecursivelyAccessedLocalsIndices()

  Returns an int[] containing the indices of the local variable slots accessed by this Subroutine (read-accessed, write-accessed or both); local variables referenced by subroutines of this subroutine are included.

  See Also:
    `getAccessedLocalsIndices()`

### subSubs

    Subroutine[] subSubs()

  Returns the subroutines that are directly called from this subroutine.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.