public class Method implements Invocable<Object>:
Class representing a method.
Implements Invocable for uniform invocation across functions, methods, and constructors.
import klyn.reflection
method = MyClass.class.getMethod("process")
if method is Invocable<String>:
result = method.invoke([])| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | annotationsannotations as IList<Annotation>: |
Method annotations |
| public readonly property | bodybody as String: |
Method to get the body of the method |
| public readonly property | declaringClassdeclaringClass as String: |
Declaring class |
| public readonly property | flagsflags as Int: |
Raw modifier flags |
| public property | isAccessibleisAccessible as Boolean: |
Accessibility flag for private/protected member access. |
| public readonly property | namename as String: |
Method to get the name of the method |
| public readonly property | parameterCountparameterCount as Int: |
Parameter count for Invocable interface |
| public readonly property | parameters | Method to get the parameters of the method |
| public readonly property | returnTypereturnType as String: |
Method to get the return type name required by Invocable |
| public readonly property | returnTypeInforeturnTypeInfo as Type: |
Method to get the return type metadata |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Method | Constructor for Method |
| Modifier and Type | Member | Description |
|---|---|---|
| public | invoke | Invokes the method with dynamic arguments. |
| public | invokeOn | Invokes the method on an instance. |
| public override | toStringtoString() as String: |
Method to convert the method to a string representation |
| Modifier and Type | Member | Description |
|---|---|---|
| public | operator call(args as Object[]) as Object throws Exception: | Direct call operator. |