Class TypePool.Default.ComponentTypeLocator.ForArrayType

java.lang.Object
net.bytebuddy.pool.TypePool.Default.ComponentTypeLocator.ForArrayType
All Implemented Interfaces:
TypePool.AbstractBase.ComponentTypeReference, TypePool.Default.ComponentTypeLocator
Enclosing interface:
TypePool.Default.ComponentTypeLocator

@Enhance public static class TypePool.Default.ComponentTypeLocator.ForArrayType extends Object implements TypePool.Default.ComponentTypeLocator, TypePool.AbstractBase.ComponentTypeReference
A component type locator that locates an array type by a method's return value from its method descriptor.
  • Field Details

    • componentType

      private final String componentType
      The resolved component type's binary name.
  • Constructor Details

    • ForArrayType

      public ForArrayType(String methodDescriptor)
      Creates a new component type locator for an array type.
      Parameters:
      methodDescriptor - The method descriptor to resolve.
  • Method Details

    • bind

      Binds this component type to a given property name of an annotation.
      Specified by:
      bind in interface TypePool.Default.ComponentTypeLocator
      Parameters:
      name - The name of an annotation property which the returned component type reference should query for resolving an array's component type.
      Returns:
      A component type reference to an annotation value's component type.
    • resolve

      public String resolve()
      Lazily resolves the binary name of the array component type of an annotation value.
      Specified by:
      resolve in interface TypePool.AbstractBase.ComponentTypeReference
      Returns:
      The binary name of the component type of the array or null if the referenced type is not an array.