public class IndylambdaScalaClosures
extends Object
Constructor and Description |
---|
IndylambdaScalaClosures() |
Modifier and Type | Method and Description |
---|---|
static void |
findAccessedFields(java.lang.invoke.SerializedLambda lambdaProxy,
ClassLoader lambdaClassLoader,
scala.collection.mutable.Map<Class<?>,scala.collection.mutable.Set<String>> accessedFields,
boolean findTransitively)
Scans an indylambda Scala closure, along with its lexically nested closures, and populate
the accessed fields info on which fields on the outer object are accessed.
|
static scala.Option<java.lang.invoke.SerializedLambda> |
getSerializationProxy(Object maybeClosure)
Check if the given reference is a indylambda style Scala closure.
|
static java.lang.invoke.SerializedLambda |
inspect(Object closure) |
static boolean |
isIndylambdaScalaClosure(java.lang.invoke.SerializedLambda lambdaProxy) |
static boolean |
isInnerClassCtorCapturingOuter(int op,
String owner,
String name,
String desc,
String callerInternalName)
Check if the callee of a call site is a inner class constructor.
|
static boolean |
isLambdaBodyCapturingOuter(org.apache.xbean.asm7.Handle handle,
String ownerInternalName)
Check if the handle represents a target method that is:
- a STATIC method that implements a Scala lambda body in the indylambda style
- captures the enclosing
this , i.e. |
static boolean |
isLambdaMetafactory(org.apache.xbean.asm7.Handle bsmHandle)
Check if the handle represents the LambdaMetafactory that indylambda Scala closures
use for creating the lambda class and getting a closure instance.
|
static String |
LambdaMetafactoryClassName() |
static String |
LambdaMetafactoryMethodDesc() |
static String |
LambdaMetafactoryMethodName() |
static void |
org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) |
static org.slf4j.Logger |
org$apache$spark$internal$Logging$$log_() |
public static String LambdaMetafactoryClassName()
public static String LambdaMetafactoryMethodName()
public static String LambdaMetafactoryMethodDesc()
public static scala.Option<java.lang.invoke.SerializedLambda> getSerializationProxy(Object maybeClosure)
maybeClosure
- the closure to check.public static boolean isIndylambdaScalaClosure(java.lang.invoke.SerializedLambda lambdaProxy)
public static java.lang.invoke.SerializedLambda inspect(Object closure)
public static boolean isLambdaMetafactory(org.apache.xbean.asm7.Handle bsmHandle)
bsmHandle
- (undocumented)public static boolean isLambdaBodyCapturingOuter(org.apache.xbean.asm7.Handle handle, String ownerInternalName)
this
, i.e. the first argument is a reference to the same type as
the owning class.
Returns true if both criteria above are met.handle
- (undocumented)ownerInternalName
- (undocumented)public static boolean isInnerClassCtorCapturingOuter(int op, String owner, String name, String desc, String callerInternalName)
$outer
in Scala.op
- (undocumented)owner
- (undocumented)name
- (undocumented)desc
- (undocumented)callerInternalName
- (undocumented)public static void findAccessedFields(java.lang.invoke.SerializedLambda lambdaProxy, ClassLoader lambdaClassLoader, scala.collection.mutable.Map<Class<?>,scala.collection.mutable.Set<String>> accessedFields, boolean findTransitively)
This is equivalent to getInnerClosureClasses() + InnerClosureFinder + FieldAccessFinder fused into one for processing indylambda closures. The traversal order along the call graph is the same for all three combined, so they can be fused together easily while maintaining the same ordering as the existing implementation.
Precondition: this function expects the accessedFields
to be populated with all known
outer classes and their super classes to be in the map as keys, e.g.
initializing via ClosureCleaner.initAccessedFields.
lambdaProxy
- (undocumented)lambdaClassLoader
- (undocumented)accessedFields
- (undocumented)findTransitively
- (undocumented)public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)