Class GenericUtils

java.lang.Object
io.micronaut.annotation.processing.GenericUtils

@Deprecated(forRemoval=true, since="4.3.0") @Internal public class GenericUtils extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
No longer needed
Utility methods for dealing with generic type signatures.
Author:
Graeme Rocher
  • Constructor Details

    • GenericUtils

      public GenericUtils(Elements elementUtils, Types typeUtils, ModelUtils modelUtils)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      elementUtils - The Elements
      typeUtils - The Types
      modelUtils - The ModelUtils
  • Method Details

    • interfaceGenericTypesFor

      public List<? extends TypeMirror> interfaceGenericTypesFor(TypeElement element, String interfaceName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Finds the generic types for the given interface for the given class element.
      Parameters:
      element - The class element
      interfaceName - The interface
      Returns:
      The generic types or an empty list
    • resolveTypeReference

      protected TypeMirror resolveTypeReference(TypeMirror mirror, Map<String,TypeMirror> boundTypes)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resolve a type reference to use for the given type mirror taking into account generic type variables.
      Parameters:
      mirror - The mirror
      boundTypes - The already bound types for any type variable
      Returns:
      A type reference
    • resolveBoundTypes

      protected Map<String,TypeMirror> resolveBoundTypes(DeclaredType type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resolve bound types for the given declared type.
      Parameters:
      type - The declaring type
      Returns:
      The type bounds