- 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 TypeMethodDescriptionReturns the generic return type.booleanReturnstrueif the method return type is generic, orfalseif it is not.default booleanisPrimitiveParameter(int idx) Returnstrueif the type of the parameter with the given index is a primitive type, orfalseif it is not.default booleanReturnstrueif the return type is a primitive type, orfalseif it is not.default booleanReturnstrueif the return type isvoid, orfalseotherwise.default intReturns the number of parameters.default intparameterSlotSize(int idx) Returns the number of slots occupied by the parameter with the given index.default ClassDescparameterType(int idx) Returns the type of the parameter with the given index.default io.smallrye.classfile.TypeKindparameterTypeKind(int idx) Returns the type kind of the parameter with the given index.Returns the list of parameter types.default intReturns the number of slots occupied by the return type.Returns the return type.default io.smallrye.classfile.TypeKindReturns the type kind of the return type (notnull).type()Returns the descriptor of the method's type.
-
Method Details
-
type
MethodTypeDesc type()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()Returnstrueif the method return type is generic, orfalseif it is not.- Returns:
trueif the method return type is generic, orfalseif it is not
-
returnTypeKind
default io.smallrye.classfile.TypeKind returnTypeKind()Returns the type kind of the return type (notnull).- 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()Returnstrueif the return type isvoid, orfalseotherwise.- Returns:
trueif the return type isvoid, orfalseotherwise
-
isPrimitiveReturn
default boolean isPrimitiveReturn()Returnstrueif the return type is a primitive type, orfalseif it is not.- Returns:
trueif the return type is a primitive type, orfalseif it is not
-
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
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) Returnstrueif the type of the parameter with the given index is a primitive type, orfalseif it is not.- Parameters:
idx- the parameter index- Returns:
trueif the type of the parameter with the given index is a primitive type, orfalseif it is not- Throws:
IndexOutOfBoundsException- if the parameter index is out of bounds
-