Package io.jawk.intermediate
Enum BuiltinFunction
- All Implemented Interfaces:
Serializable,Comparable<BuiltinFunction>
The standard AWK built-in functions, the single source of truth shared by
the parser (recognition and dispatch) and the runtime (the
FUNCTAB
listing). Each constant carries the function name as it appears in AWK
source code, which may differ from the constant name itself (e.g.
INT for the int function). print,
printf, and getline are statements, not functions, so they
are not listed, as in gawk.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTheatan2function.Theclosefunction.Thecosfunction.Theexpfunction.Thegsubfunction.Theindexfunction.Theintfunction.Thelengthfunction.Thelogfunction.Thematchfunction.Therandfunction.Thesinfunction.Thesplitfunction.Thesprintffunction.Thesqrtfunction.Thesrandfunction.Thesubfunction.Thesubstrfunction.Thesystemfunction.Thetolowerfunction.Thetoupperfunction. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the function as it appears in AWK source code.names()Returns the names of all standard built-in functions, as they appear in AWK source code and in gawk'sFUNCTAB.static BuiltinFunctionResolves an AWK function name to its enum constant.static BuiltinFunctionReturns the enum constant of this type with the specified name.static BuiltinFunction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ATAN2
Theatan2function. -
CLOSE
Theclosefunction. -
COS
Thecosfunction. -
EXP
Theexpfunction. -
GSUB
Thegsubfunction. -
INDEX
Theindexfunction. -
INT
Theintfunction. -
LENGTH
Thelengthfunction. -
LOG
Thelogfunction. -
MATCH
Thematchfunction. -
RAND
Therandfunction. -
SIN
Thesinfunction. -
SPLIT
Thesplitfunction. -
SPRINTF
Thesprintffunction. -
SQRT
Thesqrtfunction. -
SRAND
Thesrandfunction. -
SUB
Thesubfunction. -
SUBSTR
Thesubstrfunction. -
SYSTEM
Thesystemfunction. -
TOLOWER
Thetolowerfunction. -
TOUPPER
Thetoupperfunction.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getAwkName
Returns the name of the function as it appears in AWK source code.- Returns:
- the AWK-visible function name
-
of
Resolves an AWK function name to its enum constant.- Parameters:
name- the function name as it appears in AWK source code- Returns:
- the matching constant, or
nullif the name does not denote a built-in function
-
names
Returns the names of all standard built-in functions, as they appear in AWK source code and in gawk'sFUNCTAB.- Returns:
- unmodifiable set of function names, in declaration order
-