MethodElements, or by random access via accessor
methods if only specific parts of the method is needed.
Methods can be obtained from ClassModel#methods(), or in the
traversal of member elements of a class.
ClassBuilder#withMethod(String, MethodTypeDesc, int, Consumer) is the
main way to construct methods. ClassBuilder#transformMethod allows
creating a new method by selectively processing the original method elements
and directing the results to a method builder.
All method attributes are accessible as member elements.
ClassModel#methods(), MethodTransform
| Modifier and Type | Method and Description |
|---|---|
| public Optional | Returns: the body of this method, if there is oneReturns the body of this method, if there is one. |
| public AccessFlags | |
| public Utf8Entry | |
| public Utf8Entry | Returns: the method descriptor string of this methodReturns the method descriptor string of this method. |
| public default MethodTypeDesc | Returns: the method type, as a symbolic descriptorReturns the method type, as a symbolic descriptor. |
| public Optional | Returns: the class model this method is a member of, if knownReturns the class model this method is a member of, if known. |
| code | back to summary |
|---|---|
| public Optional Returns the body of this method, if there is one. | |
| flags | back to summary |
|---|---|
| public AccessFlags flags() Returns the access flags.
| |
| methodName | back to summary |
|---|---|
| public Utf8Entry methodName() Returns the name of this method.
| |
| methodType | back to summary |
|---|---|
| public Utf8Entry methodType() Returns the method descriptor string of this method.
| |
| methodTypeSymbol | back to summary |
|---|---|
| public default MethodTypeDesc methodTypeSymbol() Returns the method type, as a symbolic descriptor.
| |
| parent | back to summary |
|---|---|
| public Optional Returns the class model this method is a member of, if known.
| |