Interface TypeDescription.ForLoadedType.Dispatcher
- Enclosing class:
TypeDescription.ForLoadedType
-
Method Summary
Modifier and TypeMethodDescriptiongetAnnotatedInterfaces(Class<?> type) Resolves the annotated interfaces of the supplied type.getAnnotatedSuperclass(Class<?> type) Resolves the annotated super class of the supplied type.Class<?> getNestHost(Class<?> type) Returns the specified class's nest host.Class<?>[]getNestMembers(Class<?> type) Returns the nest members of the other class.Class<?>[]getPermittedSubclasses(Class<?> type) Returns the permitted subclasses of the supplied type.Object[]getRecordComponents(Class<?> type) Resolves a type's record components.booleanisNestmateOf(Class<?> type, Class<?> candidate) Returnstrueif the specified type is a nest mate of the other type.booleanChecks if the supplied type is a record.booleanChecks if this type is sealed.
-
Method Details
-
getAnnotatedSuperclass
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
nullif this feature is not supported.
-
getAnnotatedInterfaces
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
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
-
isNestmateOf
Returnstrueif 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:
trueif the specified type is a nest mate of the other class.
-
isSealed
Checks if this type is sealed. This will always befalseif the current VM does not support sealed classes.- Parameters:
type- The type to check- Returns:
trueif the supplied type is sealed.
-
getPermittedSubclasses
Returns the permitted subclasses of the supplied type.- Parameters:
type- The type for which to check the permitted subclasses.- Returns:
- The permitted subclasses.
-
isRecord
Checks if the supplied type is a record.- Parameters:
type- The type to resolve.- Returns:
trueif the supplied type is a record.
-
getRecordComponents
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.
-