Class TypePool.AbstractBase.ArrayTypeResolution

java.lang.Object
net.bytebuddy.pool.TypePool.AbstractBase.ArrayTypeResolution
All Implemented Interfaces:
TypePool.Resolution
Enclosing class:
TypePool.AbstractBase

@Enhance protected static class TypePool.AbstractBase.ArrayTypeResolution extends Object implements TypePool.Resolution
A resolution for a type that, if resolved, represents an array type.
  • Field Details

    • resolution

      private final TypePool.Resolution resolution
      The underlying resolution that is represented by this instance.
    • arity

      private final int arity
      The arity of the represented array.
  • Constructor Details

    • ArrayTypeResolution

      protected ArrayTypeResolution(TypePool.Resolution resolution, int arity)
      Creates a wrapper for another resolution that, if resolved, represents an array type.
      Parameters:
      resolution - The underlying resolution that is represented by this instance.
      arity - The arity of the represented array.
  • Method Details

    • of

      protected static TypePool.Resolution of(TypePool.Resolution resolution, int arity)
      Creates a wrapper for another resolution that, if resolved, represents an array type. The wrapper is only created if the arity is not zero. If the arity is zero, the given resolution is simply returned instead.
      Parameters:
      resolution - The underlying resolution that is represented by this instance.
      arity - The arity of the represented array.
      Returns:
      A wrapper for another resolution that, if resolved, represents an array type or the given resolution if the given arity is zero.
    • isResolved

      public boolean isResolved()
      Determines if this resolution represents a fully-resolved TypeDescription.
      Specified by:
      isResolved in interface TypePool.Resolution
      Returns:
      true if the queried type could be resolved.
    • resolve

      public TypeDescription resolve()
      Resolves this resolution to a TypeDescription. If this resolution is unresolved, this method throws an exception either upon invoking this method or upon invoking at least one method of the returned type description.
      Specified by:
      resolve in interface TypePool.Resolution
      Returns:
      The type description that is represented by this resolution.