ppt4j 1.0
 
Loading...
Searching...
No Matches
ppt4j.util.AsmUtils Class Reference

Static Public Member Functions

static boolean hasLineNumberInfo (MethodNode m)
 
static boolean isReturnOp (int opcode)
 
static boolean isConstOp (int opcode)
 
static Object getConst (int opcode)
 
static String getArrayType (int operand)
 
static boolean isNative (int access)
 
static boolean isAbstract (int access)
 
static boolean isShiftOp (int opcode)
 
static Features.InstType getShiftType (int opcode)
 

Member Function Documentation

◆ getArrayType()

static String ppt4j.util.AsmUtils.getArrayType ( int operand)
static

Returns the string representation of an array type based on the given operand.

Parameters
operandthe operand representing the array type
Returns
the string representation of the array type
Exceptions
IllegalArgumentExceptionif the operand does not represent an array type

◆ getConst()

static Object ppt4j.util.AsmUtils.getConst ( int opcode)
static

Returns the constant value associated with the given opcode.

Parameters
opcodethe opcode value
Returns
the constant value based on the opcode
Exceptions
IllegalArgumentExceptionif the opcode does not correspond to a known constant

◆ getShiftType()

static Features.InstType ppt4j.util.AsmUtils.getShiftType ( int opcode)
static

This method takes an opcode as input and returns the corresponding shift type from the Features.InstType enum.

Parameters
opcodethe opcode representing the type of shift operation
Returns
the shift type corresponding to the given opcode
Exceptions
IllegalArgumentExceptionif the opcode is not a valid shift opcode

◆ hasLineNumberInfo()

static boolean ppt4j.util.AsmUtils.hasLineNumberInfo ( MethodNode m)
static

Checks if the given MethodNode contains any LineNumberNode instructions, which provide information about the source code line numbers associated with the instructions.

Parameters
mthe MethodNode to check for LineNumberNode instructions
Returns
true if the MethodNode contains at least one LineNumberNode instruction, false otherwise

◆ isAbstract()

static boolean ppt4j.util.AsmUtils.isAbstract ( int access)
static

Checks if the provided access modifier integer represents an abstract type.

Parameters
accessthe access modifier integer to check
Returns
true if the access modifier represents an abstract type, false otherwise

◆ isConstOp()

static boolean ppt4j.util.AsmUtils.isConstOp ( int opcode)
static

Checks if the given opcode represents a constant operation in bytecode instructions. Constant operations include loading the constants 0, 1, 2, 3, 4, 5, -1 for integers, 0, 1 for longs, 0, 1, 2 for floats, and 0, 1 for doubles.

Parameters
opcodethe opcode value to check
Returns
true if the opcode represents a constant operation, false otherwise

◆ isNative()

static boolean ppt4j.util.AsmUtils.isNative ( int access)
static

This method checks if the given access flags include the ACC_NATIVE flag, which indicates that a method is native.

Parameters
accessthe access flags to check
Returns
true if the ACC_NATIVE flag is present in the access flags, false otherwise

◆ isReturnOp()

static boolean ppt4j.util.AsmUtils.isReturnOp ( int opcode)
static

Checks if the given opcode corresponds to a return instruction in bytecode.

Parameters
opcodethe opcode to check
Returns
true if the opcode is a return instruction, false otherwise

◆ isShiftOp()

static boolean ppt4j.util.AsmUtils.isShiftOp ( int opcode)
static

Checks if the given opcode represents a shift operation.

Parameters
opcodethe opcode to check
Returns
true if the opcode is a shift operation, false otherwise

The documentation for this class was generated from the following file: