Package org.metricshub.jawk.ext
Class AbstractExtension
java.lang.Object
org.metricshub.jawk.ext.AbstractExtension
- All Implemented Interfaces:
JawkExtension
- Direct Known Subclasses:
CoreExtension,StdinExtension
Base class of various extensions.
Provides functionality common to most extensions, such as VM and JRT variable management, and convenience methods such as checkNumArgs() and toAwkString().
- Author:
- Danny Daglas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the mapping between Awk keywords and the functions implemented by this extension.getExtensionName.voidinit(VariableManager vmParam, JRT runtime, AwkSettings conf) Called after the creation and before normal processing of the extension, pass in the Jawk Runtime Manager and the Variable Manager once.
-
Constructor Details
-
AbstractExtension
public AbstractExtension()
-
-
Method Details
-
getExtensionName
getExtensionName.
- Specified by:
getExtensionNamein interfaceJawkExtension- Returns:
- name of the extension package.
-
init
Called after the creation and before normal processing of the extension, pass in the Jawk Runtime Manager and the Variable Manager once.It is guaranteed init() is called before invoke() is called.
- Specified by:
initin interfaceJawkExtension- Parameters:
vmParam- Reference to the Variable Managerruntime- Reference to the Runtimeconf- Reference to the settings
-
getExtensionFunctions
Returns the mapping between Awk keywords and the functions implemented by this extension. The returned map must be unmodifiable.- Specified by:
getExtensionFunctionsin interfaceJawkExtension- Returns:
- mapping from keyword to
ExtensionFunction
-