Interface MethodCreator

All Superinterfaces:
AnnotatableCreator, ExecutableCreator, MemberCreator, MethodTyped, ModifiableCreator, Typed, TypeParameterizedCreator
All Known Subinterfaces:
AbstractMethodCreator, InstanceMethodCreator, StaticMethodCreator

public sealed interface MethodCreator extends ExecutableCreator, MemberCreator permits AbstractMethodCreator, InstanceMethodCreator, StaticMethodCreator (not exhaustive)
A creator for any kind of method on a class.
  • Method Details

    • desc

      MethodDesc desc()
      Returns the descriptor of the method.
      Specified by:
      desc in interface MemberCreator
      Returns:
      the descriptor of the method
    • returning

      void returning(GenericType type)
      Change the generic return type of this method. The method type is changed with the new return type.
      Parameters:
      type - the generic return type (must not be null)
    • returning

      void returning(ClassDesc type)
      Change the return type of this method. The method type is changed with the new return type.
      Parameters:
      type - the descriptor of the return type (must not be null)
    • returning

      default void returning(Class<?> type)
      Change the return type of this method. The method type is changed with the new return type.
      Parameters:
      type - the return type (must not be null)
    • synchronized_

      default void synchronized_()
      Add the synchronized modifier flag to this creator.
      Throws:
      IllegalArgumentException - if this creator does not support the synchronized modifier flag