Interface MethodTyped

All Superinterfaces:
Typed
All Known Subinterfaces:
AbstractMethodCreator, ClassMethodDesc, ConstructorCreator, ConstructorDesc, ExecutableCreator, InstanceExecutableCreator, InstanceMethodCreator, InterfaceMethodDesc, MethodCreator, MethodDesc, StaticExecutableCreator, StaticMethodCreator

public sealed interface MethodTyped extends Typed permits MethodDesc, ConstructorDesc, ExecutableCreator
A typed thing whose type is a method type.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the generic return type.
    boolean
    Returns true if the method return type is generic, or false if it is not.
    default boolean
    Returns true if the type of the parameter with the given index is a primitive type, or false if it is not.
    default boolean
    Returns true if the return type is a primitive type, or false if it is not.
    default boolean
    Returns true if the return type is void, or false otherwise.
    default int
    Returns the number of parameters.
    default int
    Returns the number of slots occupied by the parameter with the given index.
    default ClassDesc
    parameterType(int idx)
    Returns the type of the parameter with the given index.
    default io.smallrye.classfile.TypeKind
    Returns the type kind of the parameter with the given index.
    default List<ClassDesc>
    Returns the list of parameter types.
    default int
    Returns the number of slots occupied by the return type.
    Returns the return type.
    default io.smallrye.classfile.TypeKind
    Returns the type kind of the return type (not null).
    Returns the descriptor of the method's type.
  • Method Details

    • type

      Returns the descriptor of the method's type.
      Specified by:
      type in interface Typed
      Returns:
      the descriptor of the method's type
    • returnType

      ClassDesc returnType()
      Returns the return type.
      Returns:
      the return type
    • genericReturnType

      GenericType genericReturnType()
      Returns the generic return type.
      Returns:
      the generic return type
    • hasGenericReturnType

      boolean hasGenericReturnType()
      Returns true if the method return type is generic, or false if it is not.
      Returns:
      true if the method return type is generic, or false if it is not
    • returnTypeKind

      default io.smallrye.classfile.TypeKind returnTypeKind()
      Returns the type kind of the return type (not null).
      Returns:
      the type kind of the return type (not null)
    • returnSlotSize

      default int returnSlotSize()
      Returns the number of slots occupied by the return type.
      Returns:
      the number of slots occupied by the return type
    • isVoidReturn

      default boolean isVoidReturn()
      Returns true if the return type is void, or false otherwise.
      Returns:
      true if the return type is void, or false otherwise
    • isPrimitiveReturn

      default boolean isPrimitiveReturn()
      Returns true if the return type is a primitive type, or false if it is not.
      Returns:
      true if the return type is a primitive type, or false if it is not
    • parameterTypes

      default List<ClassDesc> parameterTypes()
      Returns the list of parameter types.
      Returns:
      the list of parameter types
    • parameterCount

      default int parameterCount()
      Returns the number of parameters.
      Returns:
      the number of parameters
    • parameterType

      default ClassDesc parameterType(int idx)
      Returns the type of the parameter with the given index.
      Parameters:
      idx - the parameter index
      Returns:
      the type of the parameter with the given index
      Throws:
      IndexOutOfBoundsException - if the parameter index is out of bounds
    • parameterTypeKind

      default io.smallrye.classfile.TypeKind parameterTypeKind(int idx)
      Returns the type kind of the parameter with the given index.
      Parameters:
      idx - the parameter index
      Returns:
      the type kind of the parameter with the given index
      Throws:
      IndexOutOfBoundsException - if the parameter index is out of bounds
    • parameterSlotSize

      default int parameterSlotSize(int idx)
      Returns the number of slots occupied by the parameter with the given index.
      Parameters:
      idx - the parameter index
      Returns:
      the number of slots occupied by the parameter with the given index
      Throws:
      IndexOutOfBoundsException - if the parameter index is out of bounds
    • isPrimitiveParameter

      default boolean isPrimitiveParameter(int idx)
      Returns true if the type of the parameter with the given index is a primitive type, or false if it is not.
      Parameters:
      idx - the parameter index
      Returns:
      true if the type of the parameter with the given index is a primitive type, or false if it is not
      Throws:
      IndexOutOfBoundsException - if the parameter index is out of bounds