Class MethodGraph.Compiler.Default.Key.Harmonized<V>
java.lang.Object
net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key<V>
net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key.Harmonized<V>
- Type Parameters:
V- The type of the tokens yielded by a harmonizer.
- Enclosing class:
MethodGraph.Compiler.Default.Key<S>
protected static class MethodGraph.Compiler.Default.Key.Harmonized<V>
extends MethodGraph.Compiler.Default.Key<V>
A harmonized key represents a key where equality is decided based on tokens that are returned by a
MethodGraph.Compiler.Default.Harmonizer.-
Nested Class Summary
Nested classes/interfaces inherited from class MethodGraph.Compiler.Default.Key
MethodGraph.Compiler.Default.Key.Detached, MethodGraph.Compiler.Default.Key.Harmonized<V>, MethodGraph.Compiler.Default.Key.Store<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<V, Set<MethodDescription.TypeToken>> A mapping of identifiers to the type tokens they represent.Fields inherited from class MethodGraph.Compiler.Default.Key
internalName, parameterCount -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHarmonized(String internalName, int parameterCount, Map<V, Set<MethodDescription.TypeToken>> identifiers) Creates a new harmonized key. -
Method Summary
Modifier and TypeMethodDescriptionprotected MethodGraph.Compiler.Default.Key.Harmonized<V> Combines this key with the given key.detach(MethodDescription.TypeToken typeToken) Creates a detached version of this key.protected MethodGraph.Compiler.Default.Key.Harmonized<V> extend(MethodDescription.InDefinedShape methodDescription, MethodGraph.Compiler.Default.Harmonizer<V> harmonizer) Extends this key by the given method description.Returns a set of all identifiers of this key.protected static <Q> MethodGraph.Compiler.Default.Key.Harmonized<Q> of(MethodDescription methodDescription, MethodGraph.Compiler.Default.Harmonizer<Q> harmonizer) Creates a new harmonized key for the given method description.Methods inherited from class MethodGraph.Compiler.Default.Key
equals, hashCode
-
Field Details
-
identifiers
A mapping of identifiers to the type tokens they represent.
-
-
Constructor Details
-
Harmonized
protected Harmonized(String internalName, int parameterCount, Map<V, Set<MethodDescription.TypeToken>> identifiers) Creates a new harmonized key.- Parameters:
internalName- The internal name of the method this key identifies.parameterCount- The number of method parameters of the method this key identifies.identifiers- A mapping of identifiers to the type tokens they represent.
-
-
Method Details
-
of
protected static <Q> MethodGraph.Compiler.Default.Key.Harmonized<Q> of(MethodDescription methodDescription, MethodGraph.Compiler.Default.Harmonizer<Q> harmonizer) Creates a new harmonized key for the given method description.- Type Parameters:
Q- The type of the token yielded by a harmonizer.- Parameters:
methodDescription- The method description to represent as a harmonized key.harmonizer- The harmonizer to use.- Returns:
- A harmonized key representing the provided method.
-
detach
Creates a detached version of this key.- Parameters:
typeToken- The type token of the representative method.- Returns:
- The detached version of this key.
-
combineWith
protected MethodGraph.Compiler.Default.Key.Harmonized<V> combineWith(MethodGraph.Compiler.Default.Key.Harmonized<V> key) Combines this key with the given key.- Parameters:
key- The key to be merged with this key.- Returns:
- A harmonized key representing the merger of this key and the given key.
-
extend
protected MethodGraph.Compiler.Default.Key.Harmonized<V> extend(MethodDescription.InDefinedShape methodDescription, MethodGraph.Compiler.Default.Harmonizer<V> harmonizer) Extends this key by the given method description.- Parameters:
methodDescription- The method to extend this key with.harmonizer- The harmonizer to use for determining method equality.- Returns:
- The harmonized key representing the extension of this key with the provided method.
-
getIdentifiers
Description copied from class:MethodGraph.Compiler.Default.KeyReturns a set of all identifiers of this key.- Specified by:
getIdentifiersin classMethodGraph.Compiler.Default.Key<V>- Returns:
- A set of all identifiers of this key.
-