public final class RoutineIdentity extends Object
docs/designs/sp/routine-summary-scc-design.md §2.1a): the uniqueness
key for catalog entries, summary caches, and call-graph nodes.
This is NOT a resolution key. Overload resolution (named/positional
binding, default-fill, vendor type-family matching) is a separate function
over a candidate set — paramTypeNames here carries the canonicalized
declared type TEXT purely as a definition discriminator (two definitions
differing only in NUMBER vs INTEGER spelling are distinct
definitions), which deliberately must NOT be used to decide whether an
actual argument is compatible with a formal.
All name-derived fields hold the canonical text produced by
SQLUtil#canonKey — never raw identifier spellings — so
equals(Object)/hashCode() compare canonical values with
plain string equality (the one sanctioned way to compare identifiers is to
canonicalize once and compare the canonical outputs; see
identifier_normalization_guide.md). Absent segments are stored as
the empty string, mirroring the identity layer's null-segment rule.
Occurrence provenance (which unit, which statement index) is deliberately NOT part of identity: duplicate definitions of the same identity must stay visible as duplicates (AMBIGUOUS — bind nothing), not overwrite one another. The catalog carries provenance beside the identity.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getCanonCatalog() |
String |
getCanonName() |
String |
getCanonPackage() |
String |
getCanonSchema() |
RoutineKind |
getKind() |
String |
getOverloadDiscriminator() |
int |
getParamCount() |
List<Boolean> |
getParamHasDefault() |
List<String> |
getParamModes() |
List<String> |
getParamNames() |
List<String> |
getParamTypeNames() |
List<String> |
getRawParamNames()
Raw declared spellings, position-aligned with
getParamNames();
matching material only — never identity. |
int |
hashCode() |
static RoutineIdentity |
of(EDbVendor vendor,
RoutineKind kind,
String catalog,
String schema,
String packageName,
String simpleName,
TParameterDeclarationList params,
String overloadDiscriminator)
Builds the identity of one definition from its AST parameter list and
name segments (raw spellings; canonicalized here, exactly once).
|
String |
signatureKey()
INJECTIVE canonical signature text: two identities render equal here
iff
equals(java.lang.Object) holds. |
String |
toString() |
public static RoutineIdentity of(EDbVendor vendor, RoutineKind kind, String catalog, String schema, String packageName, String simpleName, TParameterDeclarationList params, String overloadDiscriminator)
vendor - analysis vendor (drives canonicalization rules)kind - routine kind discriminatorcatalog - raw catalog/database segment, null when absentschema - raw schema segment, null when absentpackageName - raw package segment, null for non-package routinessimpleName - raw simple routine name (required)params - declared parameter list, null for parameterlessoverloadDiscriminator - vendor extra (mssql numbered-proc ";N"
suffix), null/empty when nonepublic String getCanonCatalog()
public String getCanonSchema()
public String getCanonPackage()
public String getCanonName()
public RoutineKind getKind()
public List<String> getParamNames()
public List<String> getParamModes()
public List<String> getParamTypeNames()
public List<Boolean> getParamHasDefault()
public List<String> getRawParamNames()
getParamNames();
matching material only — never identity.public String getOverloadDiscriminator()
public int getParamCount()
public String signatureKey()
equals(java.lang.Object) holds. Every field is LENGTH-PREFIXED
(<len>:<value>), so the encoding is injective by construction
regardless of field CONTENT — a delimiter-based rendering was not
(quoted identifiers may contain any character, including the
delimiters; codex-B3-r4 finding 2). Used wherever a STRING must stand
in for the identity (scope keys); a hash digest is not injective
either and collided in practice.