- All Known Implementing Classes:
ClassHierarchyImpl.CachedClassHierarchyResolver,ClassHierarchyImpl.StaticClassHierarchyResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Provides class hierarchy information for generating correct stack maps
during code building.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordInformation about a resolved class. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClassHierarchyResolverDefault singleton instance of ClassHierarchyResolver usingClassLoader.getSystemResourceAsStream(String)as theClassStreamResolver -
Method Summary
Modifier and TypeMethodDescriptiongetClassInfo(ClassDesc classDesc) Returns theClassHierarchyResolver.ClassHierarchyInfofor a given class name, or null if the name is unknown to the resolver.static ClassHierarchyResolverReturns a ClassHierarchyResolver that extracts class hierarchy information from collections of class hierarchy metadatastatic ClassHierarchyResolverofCached(Function<ClassDesc, InputStream> classStreamResolver) Returns a ClassHierarchyResolver that extracts class hierarchy information from classfiles located by a mapping functiondefault ClassHierarchyResolverorElse(ClassHierarchyResolver other) Chains this ClassHierarchyResolver with another to be consulted if this resolver does not know about the specified class.
-
Field Details
-
DEFAULT_CLASS_HIERARCHY_RESOLVER
Default singleton instance of ClassHierarchyResolver usingClassLoader.getSystemResourceAsStream(String)as theClassStreamResolver
-
-
Method Details
-
getClassInfo
Returns theClassHierarchyResolver.ClassHierarchyInfofor a given class name, or null if the name is unknown to the resolver.- Parameters:
classDesc- descriptor of the class- Returns:
- the
ClassHierarchyResolver.ClassHierarchyInfofor a given class name, or null if the name is unknown to the resolver
-
orElse
Chains this ClassHierarchyResolver with another to be consulted if this resolver does not know about the specified class.- Parameters:
other- the other resolver- Returns:
- the chained resolver
-
ofCached
Returns a ClassHierarchyResolver that extracts class hierarchy information from classfiles located by a mapping function- Parameters:
classStreamResolver- maps class descriptors to classfile input streams- Returns:
- the ClassHierarchyResolver
-
of
static ClassHierarchyResolver of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass) Returns a ClassHierarchyResolver that extracts class hierarchy information from collections of class hierarchy metadata- Parameters:
interfaces- a collection of classes known to be interfacesclassToSuperClass- a map from classes to their super classes- Returns:
- the ClassHierarchyResolver
-