public abstract class ShapeObject extends Object
docs/designs/data-lineage/09-sqllr-v2-runtime-driven-
coverage-plan-zh.md, slice 1b): an immutable value copy of one live object the SQL-LR producer reads (a parse tree
node, a token, a runtime model object, a resolver result, a catalog object, a recorder record), taken when the
analysis froze. A mirror keeps the simple name and the getters of its live class, so producer code reads a mirror
as it read the live object, and holds no live object: references to other mirrors are handles into its
Shape.
Mirrors are compared by identity, as the live objects were: one mirror per live object.
Internal API of the SQL-LR producer.
| Modifier | Constructor and Description |
|---|---|
protected |
ShapeObject(Shape shape,
int handle) |
| Modifier and Type | Method and Description |
|---|---|
String |
liveClassName()
The name of the live object's class.
|
String |
liveSimpleName()
The simple name of the live object's class (a mirror stands for its nearest mirrored class).
|
Shape |
shape()
The shape the mirror belongs to.
|
int |
shapeHandle()
The handle of the mirror in its shape.
|
protected <T> T |
slot(Object slot)
Resolves a slot: a value, a handle to another mirror, a list of handles, or a getter that threw.
|
String |
toString()
A mirror has text only where the live object's rendering was taken (names, literals, type names, leaf
expressions; their mirrors override this): any other
toString(), including an implicit one in a string
concatenation, would print the mirror instead of what the live object printed, so it fails. |
protected ShapeObject(Shape shape, int handle)
public final int shapeHandle()
public final String liveSimpleName()
public final String liveClassName()
public String toString()
toString(), including an implicit one in a string
concatenation, would print the mirror instead of what the live object printed, so it fails.