Package net.bytebuddy.description.type
Interface TypeDescription.ForLoadedType.Dispatcher
-
- Enclosing class:
- TypeDescription.ForLoadedType
@Defaults @Proxied("java.lang.Class") protected static interface TypeDescription.ForLoadedType.Dispatcher
A dispatcher for using methods ofClassthat are not declared for Java 6.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.reflect.AnnotatedElement[]getAnnotatedInterfaces(java.lang.Class<?> type)Resolves the annotated interfaces of the supplied type.java.lang.reflect.AnnotatedElementgetAnnotatedSuperclass(java.lang.Class<?> type)Resolves the annotated super class of the supplied type.java.lang.Class<?>getNestHost(java.lang.Class<?> type)Returns the specified class's nest host.java.lang.Class<?>[]getNestMembers(java.lang.Class<?> type)Returns the nest members of the other class.java.lang.Class<?>[]getPermittedSubclasses(java.lang.Class<?> type)Returns the permitted subclasses of the supplied type.java.lang.Object[]getRecordComponents(java.lang.Class<?> type)Resolves a type's record components.booleanisNestmateOf(java.lang.Class<?> type, java.lang.Class<?> candidate)Returnstrueif the specified type is a nest mate of the other type.booleanisRecord(java.lang.Class<?> type)Checks if the supplied type is a record.booleanisSealed(java.lang.Class<?> type)Checks if this type is sealed.
-
-
-
Method Detail
-
getAnnotatedSuperclass
@MaybeNull java.lang.reflect.AnnotatedElement getAnnotatedSuperclass(java.lang.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
nullif this feature is not supported.
-
getAnnotatedInterfaces
java.lang.reflect.AnnotatedElement[] getAnnotatedInterfaces(java.lang.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 java.lang.Class<?> getNestHost(java.lang.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
java.lang.Class<?>[] getNestMembers(java.lang.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(java.lang.Class<?> type, java.lang.Class<?> candidate)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
boolean isSealed(java.lang.Class<?> type)
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
@MaybeNull java.lang.Class<?>[] getPermittedSubclasses(java.lang.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(java.lang.Class<?> type)
Checks if the supplied type is a record.- Parameters:
type- The type to resolve.- Returns:
trueif the supplied type is a record.
-
getRecordComponents
@MaybeNull java.lang.Object[] getRecordComponents(java.lang.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.
-
-