# Deprecated API

## Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

- Deprecated Interfaces
  Interface and Description
  org.apache.bcel.classfile.AttributeReader Use UnknownAttributeReader instead
  org.apache.bcel.Constants (since 6.0) DO NOT USE - use Const instead
  org.apache.bcel.ExceptionConstants (since 6.0) DO NOT USE - use ExceptionConst instead
  org.apache.bcel.generic.InstructionConstants (since 6.0) Do not use. Use InstructionConst instead.

- Deprecated Classes
  Class and Description
  org.apache.bcel.util.ClassLoader 6.0 Do not use - does not work
  org.apache.bcel.util.ClassVector as of 5.1.1 - 7/17/2005

- Deprecated Fields
  Field and Description
  org.apache.bcel.verifier.structurals.Frame._this Use the getter/setter to access the field as it may be made private in a later release
  org.apache.bcel.classfile.AccessFlags.access_flags (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.FieldOrMethod.attributes (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.FieldOrMethod.attributes_count (since 6.0) will be removed (not needed)
  org.apache.bcel.generic.InstructionFactory.cg (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.ConstantCP.class_index (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.FieldOrMethod.constant_pool (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.Attribute.constant_pool (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.ConstantPoolGen.constants (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.InstructionFactory.cp (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.FieldGenOrMethodGen.cp (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.ElementValueGen.cpGen (since 6.0) will be made private and final; do not access directly, use getter
  org.apache.bcel.classfile.ElementValue.cpool (since 6.0) will be made private and final; do not access directly, use getter
  org.apache.bcel.ExceptionConstants.EXCS_ARRAY_EXCEPTION
  org.apache.bcel.ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION Do not use these arrays, use the static methods in the ExceptionConst implementation class instead
  org.apache.bcel.ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION
  org.apache.bcel.ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION
  org.apache.bcel.ExceptionConstants.EXCS_STRING_RESOLUTION
  org.apache.bcel.generic.Select.fixed_length (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.InstructionHandle.i_position (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.CPInstruction.index (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.ConstantPoolGen.index (since 6.0) will be made private; do not access directly, use getSize()
  org.apache.bcel.generic.BranchInstruction.index (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Select.indices (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.Attribute.length (since 6.0) (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Instruction.length (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Select.match (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Select.match_length (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.LocalVariableInstruction.n (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.FieldGenOrMethodGen.name (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.ConstantCP.name_and_type_index (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.FieldOrMethod.name_index (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.Attribute.name_index (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Instruction.opcode (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Select.padding (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.BranchInstruction.position (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Type.signature (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.FieldOrMethod.signature_index (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.ConstantPoolGen.size (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.Constant.tag (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.Attribute.tag (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.BranchInstruction.target (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.Select.targets (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.classfile.ElementValue.type (since 6.0) will be made private and final; do not access directly, use getter
  org.apache.bcel.generic.Type.type (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.FieldGenOrMethodGen.type (since 6.0) will be made private; do not access directly, use getter/setter
  org.apache.bcel.generic.ElementValueGen.type (since 6.0) will be made private and final; do not access directly, use getter
  org.apache.bcel.util.ClassVector.vec
  org.apache.bcel.util.ClassQueue.vec (since 6.0) will be made private; do not access

- Deprecated Methods
  Method and Description
  org.apache.bcel.classfile.Attribute.addAttributeReader(String, AttributeReader) (6.0) Use `Attribute.addAttributeReader(String, UnknownAttributeReader)` instead
  org.apache.bcel.generic.ReferenceType.firstCommonSuperclass(ReferenceType) use getFirstCommonSuperclass(ReferenceType t) which has slightly changed semantics.
  org.apache.bcel.generic.FieldOrMethod.getClassName(ConstantPoolGen) If the instruction references an array class, this method will return "java.lang.Object". For code generated by Java 1.5, this answer is sometimes wrong (e.g., if the "clone()" method is called on an array). A better idea is to use the `FieldOrMethod.getReferenceType(ConstantPoolGen)` method, which correctly distinguishes between class types and array types.
  org.apache.bcel.generic.FieldOrMethod.getClassType(ConstantPoolGen) If the instruction references an array class, the ObjectType returned will be invalid. Use getReferenceType() instead.
  org.apache.bcel.generic.Instruction.getComparator() (6.0) use the built in comparator, or wrap this class in another object that implements these methods
  org.apache.bcel.classfile.LocalVariableTable.getLocalVariable(int) since 5.2 because multiple variables can share the same slot, use getLocalVariable(int index, int pc) instead.
  org.apache.bcel.generic.ObjectType.referencesClass() (since 6.0) this method returns an inaccurate result if the class or interface referenced cannot be found: use referencesClassExact() instead
  org.apache.bcel.generic.ObjectType.referencesInterface() (since 6.0) this method returns an inaccurate result if the class or interface referenced cannot be found: use referencesInterfaceExact() instead
  org.apache.bcel.classfile.ConstantUtf8.setBytes(String) (since 6.0)
  org.apache.bcel.generic.Instruction.setComparator(InstructionComparator) (6.0) use the built in comparator, or wrap this class in another object that implements these methods
  org.apache.bcel.classfile.StackMapEntry.setNumberOfLocals(int) since 6.0
  org.apache.bcel.classfile.StackMapEntry.setNumberOfStackItems(int) since 6.0

- Deprecated Constructors
  Constructor and Description
  org.apache.bcel.util.ClassPath() Use SYSTEM_CLASS_PATH constant
  org.apache.bcel.classfile.FieldOrMethod(DataInputStream, ConstantPool) (6.0) Use `FieldOrMethod.FieldOrMethod(java.io.DataInput, ConstantPool)` instead.
  org.apache.bcel.classfile.StackMapEntry(int, int, StackMapType[], int, StackMapType[], ConstantPool) Since 6.0, use `StackMapEntry.StackMapEntry(int, int, StackMapType[], StackMapType[], ConstantPool)` instead

Copyright © 2004–2017 The Apache Software Foundation. All rights reserved.