Record Class ResolvedFunction
- Record Components:
symbols- every symbol the name resolves to, in the order the symbol table returned them; empty when the name is unknowndefinition- the catalogue definition, when the catalogue is what defined this name; empty for a user-defined function or an unknown name
This is the one place the two directories of functions meet. A name is looked up
in the symbol table first, so a def always wins over a library function of
the same name; a name the table does not hold is looked up in the
FunctionCatalog and, when found, registered into the table. That
registration is the laziness the IR depends on: a symbol table lists the functions
its script actually calls, not the whole installed library, so an IR dump stays the
size of the script.
Arity is answered from the catalogue whenever the catalogue is what defined the
name, because a signature's Arity is a range and a symbol's parameter list is
not. Mid declares three parameters and accepts two or three arguments; asking
the symbol would reject Mid(s, 2) the moment the first reference registered
it. A user-defined function has no range, so its parameter count is the answer.
-
Constructor Summary
ConstructorsConstructorDescriptionResolvedFunction(List<FunctionSymbol> symbols, Optional<ScalarFunction> definition) Creates an instance of aResolvedFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefinitionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.symbols()Returns the value of thesymbolsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResolvedFunction
Creates an instance of aResolvedFunctionrecord class.- Parameters:
symbols- the value for thesymbolsrecord componentdefinition- the value for thedefinitionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
symbols
Returns the value of thesymbolsrecord component.- Returns:
- the value of the
symbolsrecord component
-
definition
Returns the value of thedefinitionrecord component.- Returns:
- the value of the
definitionrecord component
-