Package net.bytebuddy.dynamic.scaffold
Class MethodGraph.Compiler.Default.Key.Store.Entry.Resolved<U>
java.lang.Object
net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Key.Store.Entry.Resolved<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.Resolved<U>
extends Object
implements MethodGraph.Compiler.Default.Key.Store.Entry<U>
An entry representing a non-ambiguous node resolution.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A node implementation representing a non-ambiguous method.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 static final int
Indicates that a type's methods are already globally visible, meaning that a bridge method is not added with the intend of creating a visibility bridge.private final boolean
true
if this entry's representative was made visible by a visibility bridge.private final MethodDescription
The non-ambiguous, representative method of this entry.private static final boolean
Indicates that the entry was not made visible.private final Visibility
The minimal required visibility for this method. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Resolved
(MethodGraph.Compiler.Default.Key.Harmonized<U> key, MethodDescription methodDescription, Visibility visibility) Creates a new resolved entry that is not made visible.protected
Resolved
(MethodGraph.Compiler.Default.Key.Harmonized<U> key, MethodDescription methodDescription, Visibility visibility, boolean madeVisible) Creates a new resolved 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.private static <V> MethodGraph.Compiler.Default.Key.Store.Entry
<V> of
(MethodGraph.Compiler.Default.Key.Harmonized<V> key, MethodDescription override, MethodDescription original, Visibility visibility) Creates an entry for an override where a method overrides another method within a super class.
-
Field Details
-
MADE_VISIBLE
private static final int MADE_VISIBLEIndicates that a type's methods are already globally visible, meaning that a bridge method is not added with the intend of creating a visibility bridge.- See Also:
-
NOT_MADE_VISIBLE
private static final boolean NOT_MADE_VISIBLEIndicates that the entry was not made visible.- See Also:
-
key
The harmonized key this entry represents. -
methodDescription
The non-ambiguous, representative method of this entry. -
visibility
The minimal required visibility for this method. -
madeVisible
private final boolean madeVisibletrue
if this entry's representative was made visible by a visibility bridge.
-
-
Constructor Details
-
Resolved
protected Resolved(MethodGraph.Compiler.Default.Key.Harmonized<U> key, MethodDescription methodDescription, Visibility visibility) Creates a new resolved entry that is not made visible.- Parameters:
key
- The harmonized key this entry represents.methodDescription
- The non-ambiguous, representative method of this entry.visibility
- The minimal required visibility for this method.
-
Resolved
protected Resolved(MethodGraph.Compiler.Default.Key.Harmonized<U> key, MethodDescription methodDescription, Visibility visibility, boolean madeVisible) Creates a new resolved entry.- Parameters:
key
- The harmonized key this entry represents.methodDescription
- The non-ambiguous, representative method of this entry.visibility
- The minimal required visibility for this method.madeVisible
-true
if this entry's representative was made visible by a visibility bridge.
-
-
Method Details
-
of
private static <V> MethodGraph.Compiler.Default.Key.Store.Entry<V> of(MethodGraph.Compiler.Default.Key.Harmonized<V> key, MethodDescription override, MethodDescription original, Visibility visibility) Creates an entry for an override where a method overrides another method within a super class.- Type Parameters:
V
- The type of the harmonized key to determine method equality.- Parameters:
key
- The merged key for both methods.override
- The method declared by the extending type, potentially a bridge method.original
- The method that is overridden by the extending type.visibility
- The minimal required visibility for this entry.- Returns:
- An entry representing the merger of 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.
-