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

- Packages that use Attribute
  Package | Description
  --- | ---
  org.apache.bcel.classfile | This package contains the classes that describe the structure of a Java class file and a class file parser.
  org.apache.bcel.generic | This package contains the "generic" part of the Byte Code Engineering Library, i.e., 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 and 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.
    `class` | `Code` This class represents a chunk of Java byte code contained in a method.
    `class` | `ConstantValue` This class is derived from Attribute and represents a constant value, i.e., a default value for initializing a class field.
    `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 ...
    `class` | `ExceptionTable` This class represents the table of exceptions that are thrown by a method.
    `class` | `InnerClasses` This class is derived from Attribute and denotes that this class is an Inner class of another.
    `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`
    `class` | `MethodParameters` This class represents a MethodParameters attribute.
    `class` | `Module` This class is derived from Attribute and represents the list of modules required, exported, opened or provided by a module.
    `class` | `ModuleMainClass` This class is derived from Attribute and indicates the main class of a module.
    `class` | `ModulePackages` This class is derived from Attribute and represents the list of packages that are exported or opened by the Module attribute.
    `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.
    `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
    `class` | `PMGClass` This class is derived from Attribute and represents a reference to a PMG attribute.
    `class` | `RuntimeInvisibleAnnotations` represents 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` represents 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.
    `class` | `Signature` This class is derived from Attribute and represents a reference to a GJ attribute.
    `class` | `SourceFile` This class is derived from Attribute and represents a reference to the source file of this class.
    `class` | `StackMap` This class represents a stack map attribute used for preverification of Java classes for the Java 2 Micro Edition (J2ME).
    `class` | `Synthetic` This class is derived from Attribute and declares this class as `synthetic', i.e., it needs special handling.
    `class` | `Unknown` This class represents a reference to an unknown (i.e., application-specific) attribute of a class.

    Fields in org.apache.bcel.classfile declared as Attribute
    Modifier and Type | Field and Description
    --- | ---
    `protected Attribute[]` | FieldOrMethod.`attributes` Deprecated. (since 6.0) will be made private; do not access directly, use getter/setter
    `static Attribute[]` | Attribute.`EMPTY_ARRAY` Empty array.

    Methods in org.apache.bcel.classfile that return Attribute
    Modifier and Type | Method and Description
    --- | ---
    `Attribute` | ModulePackages.`copy(ConstantPool constantPool)`
    `Attribute` | Synthetic.`copy(ConstantPool constantPool)`
    `Attribute` | PMGClass.`copy(ConstantPool constantPool)`
    `Attribute` | LocalVariableTypeTable.`copy(ConstantPool constantPool)`
    `abstract Attribute` | Attribute.`copy(ConstantPool constantPool)`
    `Attribute` | Code.`copy(ConstantPool constantPool)`
    `Attribute` | RuntimeVisibleAnnotations.`copy(ConstantPool constantPool)`
    `Attribute` | ConstantValue.`copy(ConstantPool constantPool)`
    `Attribute` | AnnotationDefault.`copy(ConstantPool constantPool)`
    `Attribute` | EnclosingMethod.`copy(ConstantPool constantPool)`
    `Attribute` | ModuleMainClass.`copy(ConstantPool constantPool)`
    `Attribute` | ParameterAnnotations.`copy(ConstantPool constantPool)`
    `Attribute` | ExceptionTable.`copy(ConstantPool constantPool)`
    `Attribute` | MethodParameters.`copy(ConstantPool constantPool)`
    `Attribute` | SourceFile.`copy(ConstantPool constantPool)`
    `Attribute` | Deprecated.`copy(ConstantPool constantPool)`
    `Attribute` | Unknown.`copy(ConstantPool constantPool)`
    `Attribute` | InnerClasses.`copy(ConstantPool constantPool)`
    `Attribute` | LocalVariableTable.`copy(ConstantPool constantPool)`
    `Attribute` | LineNumberTable.`copy(ConstantPool constantPool)`
    `Attribute` | Module.`copy(ConstantPool constantPool)`
    `Attribute` | NestMembers.`copy(ConstantPool constantPool)`
    `Attribute` | Signature.`copy(ConstantPool constantPool)`
    `Attribute` | RuntimeInvisibleAnnotations.`copy(ConstantPool constantPool)`
    `Attribute` | Annotations.`copy(ConstantPool constantPool)`
    `Attribute` | StackMap.`copy(ConstantPool constantPool)`
    `Attribute` | NestHost.`copy(ConstantPool constantPool)`
    `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` | 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[]` | Code.`getAttributes()`
    `Attribute[]` | FieldOrMethod.`getAttributes()`
    `Attribute[]` | JavaClass.`getAttributes()`
    `static Attribute` | Attribute.`readAttribute(DataInput file, ConstantPool constantPool)` Class method reads one attribute from the input data stream.
    `static Attribute` | Attribute.`readAttribute(DataInputStream file, 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 and Description
    --- | ---
    `static AnnotationEntry[]` | AnnotationEntry.`createAnnotationEntries(Attribute[] attrs)`
    `static ParameterAnnotationEntry[]` | ParameterAnnotationEntry.`createParameterAnnotationEntries(Attribute[] attrs)`
    `void` | Code.`setAttributes(Attribute[] attributes)`
    `void` | FieldOrMethod.`setAttributes(Attribute[] attributes)`
    `void` | JavaClass.`setAttributes(Attribute[] attributes)`

    Constructors in org.apache.bcel.classfile with parameters of type Attribute
    Constructor and Description
    `Code(int nameIndex, int length, int maxStack, int maxLocals, byte[] code, CodeException[] exceptionTable, Attribute[] attributes, ConstantPool constantPool)`
    `Field(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
    `FieldOrMethod(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
    `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)`

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

    Methods in org.apache.bcel.generic that return Attribute
    Modifier and Type | Method and Description
    --- | ---
    `Attribute[]` | FieldGenOrMethodGen.`getAttributes()`
    `Attribute[]` | ClassGen.`getAttributes()`
    `Attribute[]` | MethodGen.`getCodeAttributes()`

    Methods in org.apache.bcel.generic with parameters of type Attribute
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | FieldGenOrMethodGen.`addAll(Attribute[] attrs)`
    `void` | FieldGenOrMethodGen.`addAttribute(Attribute a)` Add an attribute to this method.
    `void` | ClassGen.`addAttribute(Attribute a)` Add an attribute to this class.
    `void` | MethodGen.`addCodeAttribute(Attribute a)` Add an attribute to the code.
    `void` | FieldGenOrMethodGen.`removeAttribute(Attribute a)` Remove an attribute.
    `void` | ClassGen.`removeAttribute(Attribute a)` Remove an attribute from this class.
    `void` | MethodGen.`removeCodeAttribute(Attribute a)` Remove a code attribute.
    `void` | MethodGen.`removeRuntimeAttributes(Attribute[] attrs)` 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.

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