Interface MethodDesc

All Superinterfaces:
MemberDesc, MethodTyped, Typed
All Known Subinterfaces:
ClassMethodDesc, InterfaceMethodDesc

public sealed interface MethodDesc extends MemberDesc, MethodTyped permits ClassMethodDesc, InterfaceMethodDesc (not exhaustive)
A descriptor for a method.
  • Method Details

    • of

      static MethodDesc of(Class<?> owner, String name, MethodTypeDesc type)
      Construct a new instance.
      Parameters:
      owner - the class which contains the method (must not be null)
      name - the name of the method (must not be null)
      type - the descriptor of the type of the method (must not be null)
      Returns:
      the method descriptor (must not be null)
    • of

      static MethodDesc of(Class<?> owner, String name, MethodType type)
      Construct a new instance.
      Parameters:
      owner - the class which contains the method (must not be null)
      name - the name of the method (must not be null)
      type - the type of the method (must not be null)
      Returns:
      the method descriptor (must not be null)
    • of

      static MethodDesc of(Class<?> owner, String name, Class<?> returnType, Class<?>... paramTypes)
      Construct a new instance.
      Parameters:
      owner - the class which contains the method (must not be null)
      name - the name of the method (must not be null)
      returnType - the class of the return type (must not be null)
      paramTypes - the classes of the parameter types (must not be null)
      Returns:
      the method descriptor (must not be null)
    • of

      static MethodDesc of(Class<?> owner, String name, Class<?> returnType, List<Class<?>> paramTypes)
      Construct a new instance.
      Parameters:
      owner - the class which contains the method (must not be null)
      name - the name of the method (must not be null)
      returnType - the class of the return type (must not be null)
      paramTypes - the classes of the parameter types (must not be null)
      Returns:
      the method descriptor (must not be null)
    • of

      static MethodDesc of(Method method)
      Returns a method descriptor for the given method.
      Parameters:
      method - the method (must not be null)
      Returns:
      a method descriptor for the given method