org.apache.bcel.generic.InstructionHandle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-bcel Show documentation
Show all versions of commons-bcel Show documentation
Apache Commons Bytecode Engineering Library, with type annotations
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.bcel.generic;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.bcel.classfile.Utility;
/*>>>
import org.checkerframework.checker.initialization.qual.UnknownInitialization;
import org.checkerframework.checker.interning.qual.*;
import org.checkerframework.checker.nullness.qual.Nullable;
*/
/**
* Instances of this class give users a handle to the instructions contained in
* an InstructionList. Instruction objects may be used more than once within a
* list, this is useful because it saves memory and may be much faster.
*
* Within an InstructionList an InstructionHandle object is wrapped
* around all instructions, i.e., it implements a cell in a
* doubly-linked list. From the outside only the next and the
* previous instruction (handle) are accessible. One
* can traverse the list via an Enumeration returned by
* InstructionList.elements().
*
* @version $Id$
* @see Instruction
* @see BranchHandle
* @see InstructionList
*/
public /*@UsesObjectEquals*/ class InstructionHandle {
private InstructionHandle next;
private InstructionHandle prev;
private Instruction instruction;
/**
* @deprecated (since 6.0) will be made private; do not access directly, use getter/setter
*/
@Deprecated
protected int i_position = -1; // byte code offset of instruction
private Set targeters;
private Map