Class TypeDescription.LazyProxy

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler
    Enclosing interface:
    TypeDescription

    @Enhance
    public static class TypeDescription.LazyProxy
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler
    A lazy proxy for representing a TypeDescription for a loaded type. This proxy is used to avoid locks when Byte Buddy is loaded circularly.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class<?> type
      The represented loaded type.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected LazyProxy​(java.lang.Class<?> type)
      Creates a new lazy proxy.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] argument)
      protected static TypeDescription of​(java.lang.Class<?> type)
      Resolves a lazy proxy for a loaded type as a type description.
      • Methods inherited from class java.lang.Object

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

      • type

        private final java.lang.Class<?> type
        The represented loaded type.
    • Constructor Detail

      • LazyProxy

        protected LazyProxy​(java.lang.Class<?> type)
        Creates a new lazy proxy.
        Parameters:
        type - The represented loaded type.
    • Method Detail

      • of

        protected static TypeDescription of​(java.lang.Class<?> type)
        Resolves a lazy proxy for a loaded type as a type description.
        Parameters:
        type - The represented loaded type.
        Returns:
        The lazy proxy.
      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       @MaybeNull
                                       java.lang.Object[] argument)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable