Package net.bytebuddy.dynamic.scaffold
Class MethodGraph.Compiler.Default.Key.Store.Entry.Ambiguous<U>
java.lang.Object
net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key.Store.Entry.Ambiguous<U>
- Type Parameters:
U
- The type of the harmonized key to determine method equality.
- All Implemented Interfaces:
MethodGraph.Compiler.Default.Key.Store.Entry<U>
- Enclosing interface:
- MethodGraph.Compiler.Default.Key.Store.Entry<W>
@Enhance
public static class MethodGraph.Compiler.Default.Key.Store.Entry.Ambiguous<U>
extends Object
implements MethodGraph.Compiler.Default.Key.Store.Entry<U>
An entry representing an ambiguous node resolution.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A node implementation representing an ambiguous method resolution.Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key.Store.Entry
MethodGraph.Compiler.Default.Key.Store.Entry.Ambiguous<U>, MethodGraph.Compiler.Default.Key.Store.Entry.Initial<U>, MethodGraph.Compiler.Default.Key.Store.Entry.Resolved<U>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodGraph.Compiler.Default.Key.Harmonized<U>
The harmonized key this entry represents.private final LinkedHashSet<MethodDescription>
A set of ambiguous methods that this entry represents.private final Visibility
The minimal required visibility for this method. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Ambiguous
(MethodGraph.Compiler.Default.Key.Harmonized<U> key, LinkedHashSet<MethodDescription> methodDescriptions, Visibility visibility) Creates a new ambiguous entry. -
Method Summary
Modifier and TypeMethodDescriptionTransforms this entry into a node.extendBy
(MethodDescription methodDescription, MethodGraph.Compiler.Default.Harmonizer<U> harmonizer) Extends this entry by the given method.Returns all candidate methods represented by this entry.getKey()
Returns the harmonized key of this entry.Returns the minimal visibility of this entry.Injects the given key into this entry.protected static <Q> MethodGraph.Compiler.Default.Key.Store.Entry<Q>
of
(MethodGraph.Compiler.Default.Key.Harmonized<Q> key, MethodDescription left, MethodDescription right, Visibility visibility) Creates a new ambiguous entry if both provided entries are not considered to be a bridge of one another.
-
Field Details
-
key
The harmonized key this entry represents. -
methodDescriptions
A set of ambiguous methods that this entry represents. -
visibility
The minimal required visibility for this method.
-
-
Constructor Details
-
Ambiguous
protected Ambiguous(MethodGraph.Compiler.Default.Key.Harmonized<U> key, LinkedHashSet<MethodDescription> methodDescriptions, Visibility visibility) Creates a new ambiguous entry.- Parameters:
key
- The harmonized key this entry represents.methodDescriptions
- A set of ambiguous methods that this entry represents.visibility
- The minimal required visibility for this method.
-
-
Method Details
-
of
protected static <Q> MethodGraph.Compiler.Default.Key.Store.Entry<Q> of(MethodGraph.Compiler.Default.Key.Harmonized<Q> key, MethodDescription left, MethodDescription right, Visibility visibility) Creates a new ambiguous entry if both provided entries are not considered to be a bridge of one another.- Type Parameters:
Q
- The type of the token of the harmonized key to determine method equality.- Parameters:
key
- The key of the entry to be created.left
- The left method to be considered.right
- The right method to be considered.visibility
- The entry's minimal visibility.- Returns:
- The entry representing both methods.
-
getKey
Returns the harmonized key of this entry.- Specified by:
getKey
in interfaceMethodGraph.Compiler.Default.Key.Store.Entry<U>
- Returns:
- The harmonized key of this entry.
-
getCandidates
Returns all candidate methods represented by this entry.- Specified by:
getCandidates
in interfaceMethodGraph.Compiler.Default.Key.Store.Entry<U>
- Returns:
- All candidate methods represented by this entry.
-
getVisibility
Returns the minimal visibility of this entry.- Specified by:
getVisibility
in interfaceMethodGraph.Compiler.Default.Key.Store.Entry<U>
- Returns:
- The minimal visibility of this entry.
-
extendBy
public MethodGraph.Compiler.Default.Key.Store.Entry<U> extendBy(MethodDescription methodDescription, MethodGraph.Compiler.Default.Harmonizer<U> harmonizer) Extends this entry by the given method.- Specified by:
extendBy
in interfaceMethodGraph.Compiler.Default.Key.Store.Entry<U>
- Parameters:
methodDescription
- The method description to extend this entry with.harmonizer
- The harmonizer to use for determining method equality.- Returns:
- This key extended by the given method.
-
inject
public MethodGraph.Compiler.Default.Key.Store.Entry<U> inject(MethodGraph.Compiler.Default.Key.Store.Entry<U> entry) Injects the given key into this entry.- Specified by:
inject
in interfaceMethodGraph.Compiler.Default.Key.Store.Entry<U>
- Parameters:
entry
- The entry to be combined.- Returns:
- This entry extended with the given key.
-
asNode
Transforms this entry into a node.- Specified by:
asNode
in interfaceMethodGraph.Compiler.Default.Key.Store.Entry<U>
- Parameters:
merger
- The merger to use for determining the representative method of an ambiguous node.- Returns:
- The resolved node.
-