Class AbstractBeanResolutionContext.AbstractSegment<B,T>

java.lang.Object
io.micronaut.context.AbstractBeanResolutionContext.AbstractSegment<B,T>
All Implemented Interfaces:
BeanResolutionContext.Segment<B,T>, io.micronaut.core.naming.Named
Direct Known Subclasses:
AbstractBeanResolutionContext.AnnotationSegment, AbstractBeanResolutionContext.ConstructorSegment, AbstractBeanResolutionContext.EventListenerSegment, AbstractBeanResolutionContext.FieldSegment, AbstractBeanResolutionContext.MethodSegment
Enclosing class:
AbstractBeanResolutionContext

protected abstract static class AbstractBeanResolutionContext.AbstractSegment<B,T> extends Object implements BeanResolutionContext.Segment<B,T>, io.micronaut.core.naming.Named
Abstract class for a Segment.
Since:
1.2.3
  • Field Details

    • MEMBER_SEPARATOR

      protected static final String MEMBER_SEPARATOR
      The separator between a type and its member when printing to user.
      See Also:
  • Method Details

    • getTypeName

      protected String getTypeName(Class<?> type)
      A common method for retrieving a name for type. The default behavior is to use the shortened type name.
      Parameters:
      type - The type
      Returns:
      The name to be shown to user
    • getName

      public String getName()
      Specified by:
      getName in interface BeanResolutionContext.Segment<B,T>
      Specified by:
      getName in interface io.micronaut.core.naming.Named
      Returns:
      The name of the segment. For a field this is the field name, for a method the method name and for a constructor the type name
    • getDeclaringType

      public BeanDefinition<B> getDeclaringType()
      Specified by:
      getDeclaringType in interface BeanResolutionContext.Segment<B,T>
      Returns:
      The type requested
    • getDeclaringTypeQualifier

      public @Nullable Qualifier<B> getDeclaringTypeQualifier()
      Specified by:
      getDeclaringTypeQualifier in interface BeanResolutionContext.Segment<B,T>
      Returns:
      The declaring type qualifier
    • getArgument

      public io.micronaut.core.type.Argument<T> getArgument()
      Specified by:
      getArgument in interface BeanResolutionContext.Segment<B,T>
      Returns:
      The argument to create the type. For a field this will be empty
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object