Package net.bytebuddy.dynamic.scaffold
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 aMethodGraph.Compiler.Default.Harmonizer
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key
MethodGraph.Compiler.Default.Key.Detached, MethodGraph.Compiler.Default.Key.Harmonized<V>, MethodGraph.Compiler.Default.Key.Store<V>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<V,java.util.Set<MethodDescription.TypeToken>>
identifiers
A mapping of identifiers to the type tokens they represent.-
Fields inherited from class net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key
internalName, parameterCount
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Harmonized(java.lang.String internalName, int parameterCount, java.util.Map<V,java.util.Set<MethodDescription.TypeToken>> identifiers)
Creates a new harmonized key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MethodGraph.Compiler.Default.Key.Harmonized<V>
combineWith(MethodGraph.Compiler.Default.Key.Harmonized<V> key)
Combines this key with the given key.protected MethodGraph.Compiler.Default.Key.Detached
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.protected java.util.Set<V>
getIdentifiers()
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 net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key
equals, hashCode
-
-
-
-
Field Detail
-
identifiers
private final java.util.Map<V,java.util.Set<MethodDescription.TypeToken>> identifiers
A mapping of identifiers to the type tokens they represent.
-
-
Constructor Detail
-
Harmonized
protected Harmonized(java.lang.String internalName, int parameterCount, java.util.Map<V,java.util.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 Detail
-
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
protected MethodGraph.Compiler.Default.Key.Detached detach(MethodDescription.TypeToken typeToken)
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
protected java.util.Set<V> getIdentifiers()
Description copied from class:MethodGraph.Compiler.Default.Key
Returns a set of all identifiers of this key.- Specified by:
getIdentifiers
in classMethodGraph.Compiler.Default.Key<V>
- Returns:
- A set of all identifiers of this key.
-
-