pub struct LambdaExpr {Show 13 fields
pub kind: LambdaKind,
pub sam_name: String,
pub sam_desc: MethodDescriptor,
pub inst_sam_desc: Option<MethodDescriptor>,
pub impl_owner: String,
pub impl_name: String,
pub impl_desc: MethodDescriptor,
pub impl_is_static: bool,
pub captures: Vec<Expr>,
pub param_names: Vec<String>,
pub sam_cls: String,
pub ref_receiver: Option<String>,
pub capture_snaps: Vec<(u32, u32, String)>,
}Fields§
§kind: LambdaKind§sam_name: StringFunctional interface method name/desc for casting ambiguity if needed.
sam_desc: MethodDescriptor§inst_sam_desc: Option<MethodDescriptor>LambdaMetafactory instantiatedMethodType (bootstrap arg 2): the
SAM descriptor as javac INSTANTIATED it at this site — for
.<ConstantDesc>map(Utf8Entry::stringValue) it is
(LUtf8Entry;)LConstantDesc; against the erased samMethodType
(LObject;)LObject;. The only bytecode record of explicit type
arguments on a lambda/method-ref call.
impl_owner: StringImplementation method (for Lambda kind: the body is emitted from it, or referenced by name when it belongs to another class).
impl_name: String§impl_desc: MethodDescriptor§impl_is_static: bool§captures: Vec<Expr>Captured arguments (evaluated at indy call site), in impl-arg order after the SAM parameters.
param_names: Vec<String>SAM parameter names (synthesized if absent).
sam_cls: StringThe SAM interface’s internal name (the indy descriptor’s return):
a lambda used as a call RECEIVER must print with the source’s SAM
cast (((BooleanSupplier) () -> ..).getAsBoolean() — a bare lambda
cannot be an owner: 此处不应为 lambda 表达式, jdk26 Proxy).
ref_receiver: Option<String>Method-ref receiver class name, for X::y form.
capture_snaps: Vec<(u32, u32, String)>Snapshot renames for captured outer locals that are NOT
effectively final (the decompiler hoists+reassigns them):
(outer var id, impl-method param var id, snapshot name). The
method pass declares final T name = outer; before the lambda’s
statement and the printer renames the impl param accordingly.