Enum Super.Instantiation

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Super.Instantiation>
    Enclosing class:
    Super

    public static enum Super.Instantiation
    extends java.lang.Enum<Super.Instantiation>
    Determines the instantiation of the proxy type.
    See Also:
    Super
    • Enum Constant Detail

      • CONSTRUCTOR

        public static final Super.Instantiation CONSTRUCTOR
        A proxy instance is instantiated by its constructor. For the constructor's arguments, the parameters default values are used. The constructor can be identified by setting Super.constructorParameters().
      • UNSAFE

        public static final Super.Instantiation UNSAFE
        A proxy is instantiated by calling JVM internal methods and without calling a constructor. This strategy might fail on exotic JVM implementations.
    • Constructor Detail

      • Instantiation

        private Instantiation()
    • Method Detail

      • values

        public static Super.Instantiation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Super.Instantiation c : Super.Instantiation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Super.Instantiation valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • proxyFor

        protected abstract StackManipulation proxyFor​(TypeDescription parameterType,
                                                      Implementation.Target implementationTarget,
                                                      AnnotationDescription.Loadable<Super> annotation)
        Creates a stack manipulation which loads a super-call proxy onto the stack.
        Parameters:
        parameterType - The type of the parameter that was annotated with Super
        implementationTarget - The implementation target for the currently created type.
        annotation - The annotation that caused this method call.
        Returns:
        A stack manipulation representing this instance's instantiation strategy.