java.lang.Object
io.github.sugarcubes.cloner.bytecode.MethodSpec
Method of a generated class.
-
Constructor Summary
ConstructorsConstructorDescriptionMethodSpec(int access, String name, String descriptor, Consumer<CodeEmitter> body) Creates the method. -
Method Summary
Modifier and TypeMethodDescriptionvoidemit(CodeEmitter code) Emits the instructions of the method.intReturns the access flags.Returns the method descriptor.getName()Returns the method name.
-
Constructor Details
-
MethodSpec
Creates the method.- Parameters:
access- access flags (Modifiervalues)name- method namedescriptor- method descriptorbody- emits the instructions
-
-
Method Details
-
getAccess
public int getAccess()Returns the access flags.- Returns:
- access flags
-
getName
Returns the method name.- Returns:
- method name
-
getDescriptor
Returns the method descriptor.- Returns:
- method descriptor
-
emit
Emits the instructions of the method.- Parameters:
code- emitter of the backend
-