# Uses of Class
org.apache.bcel.classfile.Attribute

Packages that use Attribute
Package
Description
org.apache.bcel.classfile
Classes that describe the structure of a Java class file and a class file parser.
org.apache.bcel.generic
Generic part of the Apache Byte Code Engineering Library (BCEL), classes to dynamically modify class objects and byte code instructions.

- ## Uses of Attribute in org.apache.bcel.classfile

  Subclasses of Attribute in org.apache.bcel.classfile
  Modifier and Type
  Class
  Description
  `class`
  `AnnotationDefault`
  Represents the default value of a annotation for a method info.
  `class`
  `Annotations`
  base class for annotations
  `class`
  `BootstrapMethods`
  This class represents a BootstrapMethods attribute.
  `final class`
  `Code`
  This class represents a chunk of Java byte code contained in a method.
  `final class`
  `ConstantValue`
  This class is derived from Attribute and represents a constant value, that is, a default value for initializing a class field.
  `final class`
  `Deprecated`
  This class is derived from Attribute and denotes that this is a deprecated method.
  `class`
  `EnclosingMethod`
  This attribute exists for local or anonymous classes and ... there can be only one.
  `final class`
  `ExceptionTable`
  This class represents the table of exceptions that are thrown by a method.
  `final class`
  `InnerClasses`
  This class is derived from Attribute and denotes that this class is an Inner class of another. to the source file of this class.
  `final class`
  `LineNumberTable`
  This class represents a table of line numbers for debugging purposes.
  `class`
  `LocalVariableTable`
  This class represents colection of local variables in a method.
  `class`
  `LocalVariableTypeTable`
  Represents the LocalVariableTypeTable attribute.
  `class`
  `MethodParameters`
  This class represents a MethodParameters attribute.
  `final class`
  `Module`
  This class is derived from Attribute and represents the list of modules required, exported, opened or provided by a module.
  `final class`
  `ModuleMainClass`
  This class is derived from Attribute and indicates the main class of a module.
  `final class`
  `ModulePackages`
  This class is derived from Attribute and represents the list of packages that are exported or opened by the Module attribute.
  `final class`
  `NestHost`
  This class is derived from Attribute and records the nest host of the nest to which the current class or interface claims to belong.
  `final class`
  `NestMembers`
  This class is derived from Attribute and records the classes and interfaces that are authorized to claim membership in the nest hosted by the current class or interface.
  `class`
  `ParameterAnnotations`
  base class for parameter annotations
  `final class`
  `PMGClass`
  This class is derived from Attribute and represents a reference to a PMG attribute.
  `final class`
  `Record`
  Extends `Attribute` and records the classes and interfaces that are authorized to claim membership in the nest hosted by the current class or interface.
  `class`
  `RuntimeInvisibleAnnotations`
  An annotation that is represented in the class file but is not provided to the JVM.
  `class`
  `RuntimeInvisibleParameterAnnotations`
  Represents a parameter annotation that is represented in the class file but is not provided to the JVM.
  `class`
  `RuntimeVisibleAnnotations`
  An annotation that is represented in the class file and is provided to the JVM.
  `class`
  `RuntimeVisibleParameterAnnotations`
  Represents a parameter annotation that is represented in the class file and is provided to the JVM.
  `final class`
  `Signature`
  This class is derived from Attribute and represents a reference to a GJ attribute.
  `final class`
  `SourceFile`
  This class is derived from Attribute and represents a reference to the source file of this class.
  `final class`
  `StackMap`
  This class represents a stack map attribute used for preverification of Java classes for the Java 2 Micro Edition (J2ME).
  `final class`
  `Synthetic`
  This class is derived from Attribute and declares this class as 'synthetic', that is, it needs special handling.
  `final class`
  `Unknown`
  This class represents a reference to an unknown (that is, application-specific) attribute of a class.
  Fields in org.apache.bcel.classfile declared as Attribute
  Modifier and Type
  Field
  Description
  `protected Attribute[]`
  FieldOrMethod.`attributes`
  Deprecated.
  (since 6.0) will be made private; do not access directly, use getter/setter.
  `static final Attribute[]`
  Attribute.`EMPTY_ARRAY`
  Empty array.
  Methods in org.apache.bcel.classfile with type parameters of type Attribute
  Modifier and Type
  Method
  Description
  `final <T extends Attribute>
  T`
  FieldOrMethod.`getAttribute(byte tag)`
  Gets attribute for given tag.
  `final <T extends Attribute>
  T`
  JavaClass.`getAttribute(byte tag)`
  Gets attribute for given tag.
  Methods in org.apache.bcel.classfile that return Attribute
  Modifier and Type
  Method
  Description
  `Attribute`
  AnnotationDefault.`copy(ConstantPool constantPool)`
  `Attribute`
  Annotations.`copy(ConstantPool constantPool)`
  `abstract Attribute`
  Attribute.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  Code.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  ConstantValue.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  Deprecated.`copy(ConstantPool constantPool)`
  `Attribute`
  EnclosingMethod.`copy(ConstantPool constantPool)`
  `Attribute`
  ExceptionTable.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  InnerClasses.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  LineNumberTable.`copy(ConstantPool constantPool)`
  `Attribute`
  LocalVariableTable.`copy(ConstantPool constantPool)`
  `Attribute`
  LocalVariableTypeTable.`copy(ConstantPool constantPool)`
  `Attribute`
  MethodParameters.`copy(ConstantPool constantPool)`
  `Attribute`
  Module.`copy(ConstantPool constantPool)`
  `Attribute`
  ModuleMainClass.`copy(ConstantPool constantPool)`
  `Attribute`
  ModulePackages.`copy(ConstantPool constantPool)`
  `Attribute`
  NestHost.`copy(ConstantPool constantPool)`
  `Attribute`
  NestMembers.`copy(ConstantPool constantPool)`
  `Attribute`
  ParameterAnnotations.`copy(ConstantPool constantPool)`
  `Attribute`
  PMGClass.`copy(ConstantPool constantPool)`
  `Attribute`
  Record.`copy(ConstantPool constantPool)`
  Copies this instance and its components.
  `Attribute`
  RuntimeInvisibleAnnotations.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  RuntimeVisibleAnnotations.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  Signature.`copy(ConstantPool constantPool)`
  `Attribute`
  SourceFile.`copy(ConstantPool constantPool)`
  `Attribute`
  StackMap.`copy(ConstantPool constantPool)`
  `Attribute`
  Synthetic.`copy(ConstantPool constantPool)`
  `Attribute`
  Unknown.`copy(ConstantPool constantPool)`
  `Attribute`
  AttributeReader.`createAttribute(int nameIndex, int length, DataInputStream file, ConstantPool constantPool)`
  Deprecated.
  When this attribute reader is added via the static method Attribute.addAttributeReader, an attribute name is associated with it.
  `Attribute`
  UnknownAttributeReader.`createAttribute(int nameIndex, int length, DataInput file, ConstantPool constantPool)`
  When this attribute reader is added via the static method Attribute.addAttributeReader, an attribute name is associated with it.
  `Attribute[]`
  Code.`getAttributes()`
  Gets the collection of code attributes.
  `final Attribute[]`
  FieldOrMethod.`getAttributes()`
  Gets the collection of object attributes.
  `Attribute[]`
  JavaClass.`getAttributes()`
  Gets attributes of the class.
  `Attribute[]`
  RecordComponentInfo.`getAttributes()`
  Gets all attributes.
  `static Attribute`
  Attribute.`readAttribute(DataInput dataInput, ConstantPool constantPool)`
  Class method reads one attribute from the input data stream.
  `static Attribute`
  Attribute.`readAttribute(DataInputStream dataInputStream, ConstantPool constantPool)`
  Class method reads one attribute from the input data stream.
  Methods in org.apache.bcel.classfile with parameters of type Attribute
  Modifier and Type
  Method
  Description
  `static AnnotationEntry[]`
  AnnotationEntry.`createAnnotationEntries(Attribute[] attributes)`
  Creates annotation entries from attributes.
  `static ParameterAnnotationEntry[]`
  ParameterAnnotationEntry.`createParameterAnnotationEntries(Attribute[] attributes)`
  `void`
  Code.`setAttributes(Attribute[] attributes)`
  Sets the attributes for this Code.
  `final void`
  FieldOrMethod.`setAttributes(Attribute[] attributes)`
  Sets the collection of object attributes.
  `void`
  JavaClass.`setAttributes(Attribute[] attributes)`
  Sets the attributes.
  Constructors in org.apache.bcel.classfile with parameters of type Attribute
  Modifier
  Constructor
  Description
  ``
  `Code(int nameIndex, int length, int maxStack, int maxLocals, byte[] code, CodeException[] exceptionTable, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a Code attribute.
  ``
  `Field(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a Field.
  `protected`
  `FieldOrMethod(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a FieldOrMethod.
  ``
  `JavaClass(int classNameIndex, int superclassNameIndex, String fileName, int major, int minor, int accessFlags, ConstantPool constantPool, int[] interfaces, Field[] fields, Method[] methods, Attribute[] attributes)`
  Constructor gets all contents as arguments.
  ``
  `JavaClass(int classNameIndex, int superclassNameIndex, String fileName, int major, int minor, int accessFlags, ConstantPool constantPool, int[] interfaces, Field[] fields, Method[] methods, Attribute[] attributes, byte source)`
  Constructor gets all contents as arguments.
  ``
  `Method(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a Method.

- ## Uses of Attribute in org.apache.bcel.generic

  Methods in org.apache.bcel.generic that return Attribute
  Modifier and Type
  Method
  Description
  `Attribute[]`
  ClassGen.`getAttributes()`
  Gets the attributes.
  `Attribute[]`
  FieldGenOrMethodGen.`getAttributes()`
  Gets all attributes of this method or field.
  `Attribute[]`
  MethodGen.`getCodeAttributes()`
  Gets all attributes of this method.
  Methods in org.apache.bcel.generic with parameters of type Attribute
  Modifier and Type
  Method
  Description
  `protected void`
  FieldGenOrMethodGen.`addAll(Attribute[] attributes)`
  Adds all attributes from an array.
  `void`
  ClassGen.`addAttribute(Attribute a)`
  Add an attribute to this class.
  `void`
  FieldGenOrMethodGen.`addAttribute(Attribute a)`
  Add an attribute to this method.
  `void`
  MethodGen.`addCodeAttribute(Attribute a)`
  Add an attribute to the code.
  `void`
  ClassGen.`removeAttribute(Attribute a)`
  Remove an attribute from this class.
  `void`
  FieldGenOrMethodGen.`removeAttribute(Attribute a)`
  Removes an attribute.
  `void`
  MethodGen.`removeCodeAttribute(Attribute a)`
  Remove a code attribute.
  `void`
  MethodGen.`removeRuntimeAttributes(Attribute[] attributes)`
  Would prefer to make this private, but need a way to test if client is using BCEL version 6.5.0 or later that contains fix for BCEL-329.