Interface ConstructorDesc

All Superinterfaces:
MemberDesc, MethodTyped, Typed

public sealed interface ConstructorDesc extends MemberDesc, MethodTyped
A descriptor for a constructor.
  • Method Details

    • of

      static ConstructorDesc of(ClassDesc owner, MethodTypeDesc type)
      Construct a new instance.
      Parameters:
      owner - the descriptor of the class which contains the constructor (must not be null)
      type - the descriptor of the type of the constructor (must not be null)
      Returns:
      the constructor descriptor (not null)
    • of

      static ConstructorDesc of(ClassDesc owner)
      Construct a new instance for a zero-parameter constructor.
      Parameters:
      owner - the descriptor of the class which contains the constructor (must not be null)
      Returns:
      the constructor descriptor (not null)
    • of

      static ConstructorDesc of(ClassDesc owner, Class<?>... paramTypes)
      Construct a new instance.
      Parameters:
      owner - the descriptor of the class which contains the constructor (must not be null)
      paramTypes - a list of parameter types (must not be null)
      Returns:
      the constructor descriptor (not null)
    • of

      static ConstructorDesc of(ClassDesc owner, ClassDesc... paramTypes)
      Construct a new instance.
      Parameters:
      owner - the descriptor of the class which contains the constructor (must not be null)
      paramTypes - a list of descriptors corresponding to the parameter types (must not be null)
      Returns:
      the constructor descriptor (not null)
    • of

      static ConstructorDesc of(ClassDesc owner, List<ClassDesc> paramTypes)
      Construct a new instance.
      Parameters:
      owner - the descriptor of the class which contains the constructor (must not be null)
      paramTypes - a list of descriptors corresponding to the parameter types (must not be null)
      Returns:
      the constructor descriptor (not null)
    • of

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

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

      static ConstructorDesc of(Class<?> owner, Class<?>... paramTypes)
      Construct a new instance.
      Parameters:
      owner - the class which contains the constructor (must not be null)
      paramTypes - a list of parameter types (must not be null)
      Returns:
      the constructor descriptor (not null)
    • of

      static ConstructorDesc of(Class<?> owner, List<Class<?>> paramTypes)
      Construct a new instance.
      Parameters:
      owner - the class which contains the constructor (must not be null)
      paramTypes - a list of parameter types (must not be null)
      Returns:
      the constructor descriptor (not null)
    • of

      static ConstructorDesc of(Constructor<?> ctor)
      Returns a constructor descriptor for the given constructor.
      Parameters:
      ctor - the constructor (must not be null)
      Returns:
      a constructor descriptor for the given constructor
    • type

      Returns a descriptor representing the type of this constructor.
      Specified by:
      type in interface MemberDesc
      Specified by:
      type in interface MethodTyped
      Specified by:
      type in interface Typed
      Returns:
      a descriptor representing the type of this constructor