Package net.bytebuddy.dynamic.scaffold
Class MethodGraph.Compiler.Default.Key.Store<V>
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key.Store<V>
-
- Type Parameters:
V
- The type of the token used for deciding on method equality.
- Enclosing class:
- MethodGraph.Compiler.Default.Key<S>
@Enhance protected static class MethodGraph.Compiler.Default.Key.Store<V> extends java.lang.Object
A store for collected methods that are identified by keys.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
MethodGraph.Compiler.Default.Key.Store.Entry<W>
An entry of a key store.protected static class
MethodGraph.Compiler.Default.Key.Store.Graph
A graph implementation based on a key store.
-
Field Summary
Fields Modifier and Type Field Description private java.util.LinkedHashMap<MethodGraph.Compiler.Default.Key.Harmonized<V>,MethodGraph.Compiler.Default.Key.Store.Entry<V>>
entries
A mapping of harmonized keys to their represented entry.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Store()
Creates an empty store.private
Store(java.util.LinkedHashMap<MethodGraph.Compiler.Default.Key.Harmonized<V>,MethodGraph.Compiler.Default.Key.Store.Entry<V>> entries)
Creates a new store representing the given entries.
-
Method Summary
-
-
-
Field Detail
-
entries
private final java.util.LinkedHashMap<MethodGraph.Compiler.Default.Key.Harmonized<V>,MethodGraph.Compiler.Default.Key.Store.Entry<V>> entries
A mapping of harmonized keys to their represented entry.
-
-
Constructor Detail
-
Store
protected Store()
Creates an empty store.
-
Store
private Store(java.util.LinkedHashMap<MethodGraph.Compiler.Default.Key.Harmonized<V>,MethodGraph.Compiler.Default.Key.Store.Entry<V>> entries)
Creates a new store representing the given entries.- Parameters:
entries
- A mapping of harmonized keys to their represented entry.
-
-
Method Detail
-
combine
private static <W> MethodGraph.Compiler.Default.Key.Store.Entry<W> combine(MethodGraph.Compiler.Default.Key.Store.Entry<W> left, MethodGraph.Compiler.Default.Key.Store.Entry<W> right)
Combines the two given stores.- Type Parameters:
W
- The type of the harmonized key of both stores.- Parameters:
left
- The left store to be combined.right
- The right store to be combined.- Returns:
- An entry representing the combination of both stores.
-
registerTopLevel
protected MethodGraph.Compiler.Default.Key.Store<V> registerTopLevel(java.util.List<? extends MethodDescription> methodDescriptions, MethodGraph.Compiler.Default.Harmonizer<V> harmonizer)
Registers a new top level method within this store.- Parameters:
methodDescriptions
- The methods to register.harmonizer
- The harmonizer to use for determining method equality.- Returns:
- A store with the given method registered as a top-level method.
-
combineWith
protected MethodGraph.Compiler.Default.Key.Store<V> combineWith(MethodGraph.Compiler.Default.Key.Store<V> store)
Combines this store with the given store.- Parameters:
store
- The store to combine with this store.- Returns:
- A store representing a combination of this store and the given store.
-
inject
protected MethodGraph.Compiler.Default.Key.Store<V> inject(MethodGraph.Compiler.Default.Key.Store<V> store)
Injects the given store into this store.- Parameters:
store
- The key store to inject into this store.- Returns:
- A store that represents this store with the given store injected.
-
asGraph
protected MethodGraph asGraph(MethodGraph.Compiler.Default.Merger merger)
Transforms this store into a method graph by applying the given merger.- Parameters:
merger
- The merger to apply for resolving the representative for ambiguous resolutions.- Returns:
- The method graph that represents this key store.
-
-