Class TypePool.Resolution.Simple

java.lang.Object
net.bytebuddy.pool.TypePool.Resolution.Simple
All Implemented Interfaces:
TypePool.Resolution
Enclosing interface:
TypePool.Resolution

@Enhance public static class TypePool.Resolution.Simple extends Object implements TypePool.Resolution
A simple resolution that represents a given TypeDescription.
  • Field Details

    • typeDescription

      private final TypeDescription typeDescription
      The represented type description.
  • Constructor Details

    • Simple

      public Simple(TypeDescription typeDescription)
      Creates a new successful resolution of a given type description.
      Parameters:
      typeDescription - The represented type description.
  • Method Details

    • 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.