Package net.bytebuddy.dynamic.scaffold
Class MethodGraph.Linked.Delegation
java.lang.Object
net.bytebuddy.dynamic.scaffold.MethodGraph.Linked.Delegation
- All Implemented Interfaces:
MethodGraph
,MethodGraph.Linked
- Enclosing interface:
- MethodGraph.Linked
@Enhance
public static class MethodGraph.Linked.Delegation
extends Object
implements MethodGraph.Linked
A simple implementation of a linked method graph that exposes views by delegation to given method graphs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph
MethodGraph.Compiler, MethodGraph.Empty, MethodGraph.Linked, MethodGraph.Node, MethodGraph.NodeList, MethodGraph.Simple
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph.Linked
MethodGraph.Linked.Delegation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<TypeDescription,
MethodGraph> A mapping of method graphs of the represented type's directly implemented interfaces to their graph representatives.private final MethodGraph
The represented type's method graph.private final MethodGraph
The super class's method graph. -
Constructor Summary
ConstructorsConstructorDescriptionDelegation
(MethodGraph methodGraph, MethodGraph superClassGraph, Map<TypeDescription, MethodGraph> interfaceGraphs) Creates a new delegation method graph. -
Method Summary
Modifier and TypeMethodDescriptiongetInterfaceGraph
(TypeDescription typeDescription) Returns a graph representing the view on this represented type's directly implemented interface type.Returns a graph representing the view on this represented type's super type.Lists all nodes of this method graph.Locates a node in this graph which represents the provided method token.
-
Field Details
-
methodGraph
The represented type's method graph. -
superClassGraph
The super class's method graph. -
interfaceGraphs
A mapping of method graphs of the represented type's directly implemented interfaces to their graph representatives.
-
-
Constructor Details
-
Delegation
public Delegation(MethodGraph methodGraph, MethodGraph superClassGraph, Map<TypeDescription, MethodGraph> interfaceGraphs) Creates a new delegation method graph.- Parameters:
methodGraph
- The represented type's method graph.superClassGraph
- The super class's method graph.interfaceGraphs
- A mapping of method graphs of the represented type's directly implemented interfaces to their graph representatives.
-
-
Method Details
-
getSuperClassGraph
Returns a graph representing the view on this represented type's super type.- Specified by:
getSuperClassGraph
in interfaceMethodGraph.Linked
- Returns:
- A graph representing the view on this represented type's super type.
-
getInterfaceGraph
Returns a graph representing the view on this represented type's directly implemented interface type.- Specified by:
getInterfaceGraph
in interfaceMethodGraph.Linked
- Parameters:
typeDescription
- The interface type for which a view is to be returned.- Returns:
- A graph representing the view on this represented type's directly implemented interface type.
-
locate
Locates a node in this graph which represents the provided method token.- Specified by:
locate
in interfaceMethodGraph
- Parameters:
token
- A method token that represents the method to be located.- Returns:
- The node representing the given token.
-
listNodes
Lists all nodes of this method graph.- Specified by:
listNodes
in interfaceMethodGraph
- Returns:
- A list of all nodes of this method graph.
-