Class AsmClassReader.Default

java.lang.Object
net.bytebuddy.utility.AsmClassReader.Default
All Implemented Interfaces:
AsmClassReader
Enclosing interface:
AsmClassReader

public static class AsmClassReader.Default extends Object implements AsmClassReader
A class reader for ASM's default ClassReader.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.bytebuddy.utility.AsmClassReader

    AsmClassReader.Default, AsmClassReader.Factory
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.objectweb.asm.ClassReader
    The class reader that represents the class file to be read.
    private static final org.objectweb.asm.Attribute[]
    Indicates that no custom attributes should be mapped.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default(org.objectweb.asm.ClassReader classReader)
    Creates a new default ASM class reader.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(org.objectweb.asm.ClassVisitor classVisitor, int flags)
    Accepts a class visitor to read a class.
    <T> T
    unwrap(Class<T> type)
    Unwraps a class reader to the underlying reader mechanism.

    Methods inherited from class java.lang.Object

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

    • NO_ATTRIBUTES

      private static final org.objectweb.asm.Attribute[] NO_ATTRIBUTES
      Indicates that no custom attributes should be mapped.
    • classReader

      private final org.objectweb.asm.ClassReader classReader
      The class reader that represents the class file to be read.
  • Constructor Details

    • Default

      public Default(org.objectweb.asm.ClassReader classReader)
      Creates a new default ASM class reader.
      Parameters:
      classReader - The class reader that represents the class file to be read.
  • Method Details

    • unwrap

      @MaybeNull public <T> T unwrap(Class<T> type)
      Unwraps a class reader to the underlying reader mechanism.
      Specified by:
      unwrap in interface AsmClassReader
      Type Parameters:
      T - The type to unwrap.
      Parameters:
      type - The type of the reader that should be unwrapped.
      Returns:
      The unwrapped instance or null if the underlying instance does not represent this type.
    • accept

      public void accept(org.objectweb.asm.ClassVisitor classVisitor, int flags)
      Accepts a class visitor to read a class.
      Specified by:
      accept in interface AsmClassReader
      Parameters:
      classVisitor - The class visitor who should be used as a callback for a class file.
      flags - The flags to consider while reading a class.