Class AsmClassReader.ForClassFileApi

    • Constructor Summary

      Constructors 
      Constructor Description
      ForClassFileApi​(java.lang.Object classReader)
      Creates a new class reader that is based upon the Class File API.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(org.objectweb.asm.ClassVisitor classVisitor, int flags)
      Accepts a class visitor to read a class.
      private static <T> T doPrivileged​(java.security.PrivilegedAction<T> action)
      A proxy for java.security.AccessController#doPrivileged that is activated if available.
      <T> T unwrap​(java.lang.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 Detail

      • classReader

        private final java.lang.Object classReader
        The class reader that represents the class file to be read.
    • Constructor Detail

      • ForClassFileApi

        public ForClassFileApi​(java.lang.Object classReader)
        Creates a new class reader that is based upon the Class File API.
        Parameters:
        classReader - The class reader that represents the class file to be read.
    • Method Detail

      • doPrivileged

        @Enhance
        private static <T> T doPrivileged​(java.security.PrivilegedAction<T> action)
        A proxy for java.security.AccessController#doPrivileged that is activated if available.
        Type Parameters:
        T - The type of the action's resolved value.
        Parameters:
        action - The action to execute from a privileged context.
        Returns:
        The action's resolved value.
      • unwrap

        @MaybeNull
        public <T> T unwrap​(java.lang.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.