Class TypeVariableSource.AbstractBase

java.lang.Object
net.bytebuddy.description.ModifierReviewable.AbstractBase
net.bytebuddy.description.TypeVariableSource.AbstractBase
All Implemented Interfaces:
ModifierReviewable, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, TypeVariableSource
Direct Known Subclasses:
MethodDescription.AbstractBase, TypeDescription.AbstractBase
Enclosing interface:
TypeVariableSource

public abstract static class TypeVariableSource.AbstractBase extends ModifierReviewable.AbstractBase implements TypeVariableSource
An abstract base implementation of a type variable source.
  • Constructor Details

    • AbstractBase

      public AbstractBase()
  • Method Details

    • findVariable

      @MaybeNull public TypeDescription.Generic findVariable(String symbol)
      Finds a particular variable with the given name in the closes type variable source that is visible from this instance.
      Specified by:
      findVariable in interface TypeVariableSource
      Parameters:
      symbol - The symbolic name of the type variable.
      Returns:
      The type variable or null if it was not found.
    • findExpectedVariable

      public TypeDescription.Generic findExpectedVariable(String symbol)
      Finds a particular variable with the given name in the closes type variable source that is visible from this instance. If the variable is not found, an exception is thrown.
      Specified by:
      findExpectedVariable in interface TypeVariableSource
      Parameters:
      symbol - The symbolic name of the type variable.
      Returns:
      The type variable.
    • toSafeString

      protected abstract String toSafeString()
      Returns a Object.toString() representation that does not attempt to resolve any type variables to avoid stack overflow exceptions.
      Returns:
      A safe string representation.