Interface TypeVariableScope

All Known Subinterfaces:
ArrayTypeDetails, ClassBasedTypeDetails, ClassDetails, ClassDetailsSupport, ClassTypeDetails, MutableClassDetails, ParameterizedTypeDetails, PrimitiveTypeDetails, TypeDetails, TypeVariableDetails, TypeVariableReferenceDetails, VoidTypeDetails, WildcardTypeDetails
All Known Implementing Classes:
ArrayTypeDetailsImpl, ClassTypeDetailsImpl, DynamicClassDetails, JdkClassDetails, MissingPackageInfoDetails, ParameterizedTypeDetailsImpl, PrimitiveTypeDetailsImpl, SimpleClassDetails, TypeVariableDetailsImpl, TypeVariableReferenceDetailsImpl, VoidTypeDetailsImpl, WildcardTypeDetailsImpl

public interface TypeVariableScope
A scope for TypeVariableDetails references
  • Method Details

    • resolveTypeVariable

      TypeDetails resolveTypeVariable(TypeVariableDetails typeVariable)
      Resolve the type of the provided type variable relative to this scope.

      For example, given

       class Thing<I extends Number> {
           I id;
       }
       
      A call to this method on the Thing scope with the type variable representing I will return the I extends Number type variable definition itself.

      If this scope defines a corresponding type argument, the concrete type is returned. For example, given

       class Stuff extends Thing<Integer> {
       }
       
      This method will yield the Integer type details.
      Parameters:
      typeVariable - The type variable to resolve
      Returns:
      The type variable's resolved type, or null if none could be found
    • determineRawClass

      ClassDetails determineRawClass()
      Determine the raw class for the given type. Never returns null, opting to return Object instead if the raw class is not known
      Returns:
      The raw class details, or Object if "not known".