Class JavaConstant.Simple.OfTypeDescription

java.lang.Object
net.bytebuddy.utility.JavaConstant.Simple<TypeDescription>
net.bytebuddy.utility.JavaConstant.Simple.OfTypeDescription
All Implemented Interfaces:
ConstantValue, JavaConstant
Enclosing class:
JavaConstant.Simple<T>

protected static class JavaConstant.Simple.OfTypeDescription extends JavaConstant.Simple<TypeDescription>
Represents a type constant.
  • Constructor Details

    • OfTypeDescription

      protected OfTypeDescription(TypeDescription value)
      Creates a type constant.
      Parameters:
      value - The represented type.
  • Method Details

    • toDescription

      public Object toDescription()
      Returns this constant as a Java java.lang.constant.ConstantDesc if the current VM is of at least version 12. If the current VM is of an older version and does not support the type, an exception is thrown.
      Returns:
      This constant as a Java java.lang.constant.ConstantDesc.
    • toStackManipulation

      public StackManipulation toStackManipulation()
      Returns a stack manipulation loading this value.
      Returns:
      A stack manipulation loading this value.
    • accept

      public <T> T accept(JavaConstant.Visitor<T> visitor)
      Applies the supplied visitor to this constant type with its respective callback.
      Type Parameters:
      T - The type of the value that is returned by the visitor.
      Parameters:
      visitor - The visitor to dispatch.
      Returns:
      The value that is returned by the supplied visitor.