fromMethod

public static FunctionDeclaration fromMethod(Method method, Array<String> orderedParameterNames)

Creates a FunctionDeclaration instance from a Method instance.

Return

A FunctionDeclaration instance.

Parameters

method

The Method instance to be parsed into the FunctionDeclaration instance. Only static method is supported.

orderedParameterNames

Optional ordered parameter names. If not provided, parameter names will be retrieved via reflection.


public static FunctionDeclaration fromMethod(String functionDescription, Method method, Array<String> orderedParameterNames)

Creates a FunctionDeclaration instance from a Method instance.

Return

A FunctionDeclaration instance.

Parameters

functionDescription

Description of the function.

method

The Method instance to be parsed into the FunctionDeclaration instance. Only static method is supported.

orderedParameterNames

Optional ordered parameter names. If not provided, parameter names will be retrieved via reflection.