Interface TypeDescription.ForLoadedType.Dispatcher

Enclosing class:
TypeDescription.ForLoadedType

@Defaults @Proxied("java.lang.Class") protected static interface TypeDescription.ForLoadedType.Dispatcher
A dispatcher for using methods of Class that are not declared for Java 6.
  • Method Details

    • getAnnotatedSuperclass

      @MaybeNull AnnotatedElement getAnnotatedSuperclass(Class<?> type)
      Resolves the annotated super class of the supplied type.
      Parameters:
      type - The type to resolve.
      Returns:
      The annotated super class of the supplied type or null if this feature is not supported.
    • getAnnotatedInterfaces

      AnnotatedElement[] getAnnotatedInterfaces(Class<?> type)
      Resolves the annotated interfaces of the supplied type.
      Parameters:
      type - The type to resolve.
      Returns:
      An array of the type's annotated interfaces or an empty array if this feature is not supported.
    • getNestHost

      @MaybeNull Class<?> getNestHost(Class<?> type)
      Returns the specified class's nest host.
      Parameters:
      type - The class for which to locate the nest host.
      Returns:
      The nest host of the specified class.
    • getNestMembers

      Class<?>[] getNestMembers(Class<?> type)
      Returns the nest members of the other class.
      Parameters:
      type - The type to get the nest members for.
      Returns:
      An array containing all nest members of the specified type's nest group.
    • isNestmateOf

      boolean isNestmateOf(Class<?> type, Class<?> candidate)
      Returns true if the specified type is a nest mate of the other type.
      Parameters:
      type - The type to evaluate for being a nest mate of another type.
      candidate - The candidate type.
      Returns:
      true if the specified type is a nest mate of the other class.
    • isSealed

      boolean isSealed(Class<?> type)
      Checks if this type is sealed. This will always be false if the current VM does not support sealed classes.
      Parameters:
      type - The type to check
      Returns:
      true if the supplied type is sealed.
    • getPermittedSubclasses

      @MaybeNull Class<?>[] getPermittedSubclasses(Class<?> type)
      Returns the permitted subclasses of the supplied type.
      Parameters:
      type - The type for which to check the permitted subclasses.
      Returns:
      The permitted subclasses.
    • isRecord

      boolean isRecord(Class<?> type)
      Checks if the supplied type is a record.
      Parameters:
      type - The type to resolve.
      Returns:
      true if the supplied type is a record.
    • getRecordComponents

      @MaybeNull Object[] getRecordComponents(Class<?> type)
      Resolves a type's record components.
      Parameters:
      type - The type for which to read the record components.
      Returns:
      An array of all declared record components.