Class Attribute

java.lang.Object
io.ebean.enhance.asm.Attribute
Direct Known Subclasses:
ModuleHashesAttribute, ModuleResolutionAttribute, ModuleTargetAttribute

public class Attribute extends Object
A non standard class, field, method or Code attribute, as defined in the Java Virtual Machine Specification (JVMS).
Author:
Eric Bruneton, Eugene Kuleshov
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    The type of this attribute, also called its name in the JVMS.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this type of attribute is a Code attribute.
    boolean
    Returns true if this type of attribute is unknown.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • type

      public final String type
      The type of this attribute, also called its name in the JVMS.
  • Method Details

    • isUnknown

      public boolean isUnknown()
      Returns true if this type of attribute is unknown. This means that the attribute content can't be parsed to extract constant pool references, labels, etc. Instead, the attribute content is read as an opaque byte array, and written back as is. This can lead to invalid attributes, if the content actually contains constant pool references, labels, or other symbolic references that need to be updated when there are changes to the constant pool, the method bytecode, etc. The default implementation of this method always returns true.
      Returns:
      true if this type of attribute is unknown.
    • isCodeAttribute

      public boolean isCodeAttribute()
      Returns true if this type of attribute is a Code attribute.
      Returns:
      true if this type of attribute is a Code attribute.