Package space.arim.dazzleconf.reflect
Interface MethodMirror.TypeWalker
- Enclosing interface:
MethodMirror
public static interface MethodMirror.TypeWalker
Controller for accessing the reflected methods of a given type
-
Method Summary
Modifier and TypeMethodDescription@NonNull AnnotatedElementgetAnnotations(@NonNull MethodId methodId) Gets annotations present on the specified method.@NonNull ReifiedType.AnnotatedGets the type which thisTypeWalkeris looking at@NonNull MethodMirror.TypeWalker @NonNull []Moves to the directly declared super types of this typeGets all accessible, non-inherited, instance methods declared in this type.
-
Method Details
-
getEnclosingType
@NonNull ReifiedType.Annotated getEnclosingType()Gets the type which thisTypeWalkeris looking at- Returns:
- the type
-
getViableMethods
Gets all accessible, non-inherited, instance methods declared in this type.However the returned stream is ordered, that order will later determine the order of serializing data entries. There is no need for the implementation to skip source-level covariant overides, since these will be handled by the caller, but bridge and synthetic methods do need to be skipped.
Generic values must be fully reified. The passed type information provides the reified type arguments that can help with this.
- Returns:
- a stream of methods
-
getAnnotations
Gets annotations present on the specified method.The method must be taken from
getViableMethods(), meaning it must be accessible and located in the type thisTypeWalkeris made for. This function is permitted to assume this precondition and may behave unexpectedly if it is not met.- Parameters:
methodId- the method- Returns:
- the annotations on this method
-
getSuperTypes
@NonNull MethodMirror.TypeWalker @NonNull [] getSuperTypes()Moves to the directly declared super types of this type- Returns:
- the super types
-