Class InvokeParameterUtil
- java.lang.Object
-
- com.tonic.parser.constpool.structure.InvokeParameterUtil
-
public class InvokeParameterUtil extends Object
Utility for parsing method descriptors in invoke operations.
-
-
Constructor Summary
Constructors Constructor Description InvokeParameterUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intdetermineTypeSlots(String returnType)Determines the number of slots based on the return type.static intparseDescriptorParameters(String descriptor)Parses the method descriptor to count the number of parameters.static StringparseDescriptorReturnType(String descriptor)Parses the method descriptor to extract the return type.
-
-
-
Method Detail
-
parseDescriptorParameters
public static int parseDescriptorParameters(String descriptor)
Parses the method descriptor to count the number of parameters.- Parameters:
descriptor- The method descriptor string.- Returns:
- The number of parameters.
-
parseDescriptorReturnType
public static String parseDescriptorReturnType(String descriptor)
Parses the method descriptor to extract the return type.- Parameters:
descriptor- The method descriptor string.- Returns:
- The return type as a string.
-
determineTypeSlots
public static int determineTypeSlots(String returnType)
Determines the number of slots based on the return type.- Parameters:
returnType- The return type descriptor.- Returns:
- The number of slots (0 for void, 1 for most types, 2 for long and double).
-
-