Package net.bytebuddy.dynamic.scaffold
Class MethodGraph.Simple
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.MethodGraph.Simple
-
- All Implemented Interfaces:
MethodGraph
- Enclosing interface:
- MethodGraph
@Enhance public static class MethodGraph.Simple extends java.lang.Object implements MethodGraph
A simple implementation of a method graph.
-
-
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
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.LinkedHashMap<MethodDescription.SignatureToken,MethodGraph.Node>
nodes
The nodes represented by this method graph.
-
Constructor Summary
Constructors Constructor Description Simple(java.util.LinkedHashMap<MethodDescription.SignatureToken,MethodGraph.Node> nodes)
Creates a new simple method graph.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodGraph.NodeList
listNodes()
Lists all nodes of this method graph.MethodGraph.Node
locate(MethodDescription.SignatureToken token)
Locates a node in this graph which represents the provided method token.static MethodGraph
of(java.util.List<? extends MethodDescription> methodDescriptions)
Returns a method graph that contains all of the provided methods as simple nodes.
-
-
-
Field Detail
-
nodes
private final java.util.LinkedHashMap<MethodDescription.SignatureToken,MethodGraph.Node> nodes
The nodes represented by this method graph.
-
-
Constructor Detail
-
Simple
public Simple(java.util.LinkedHashMap<MethodDescription.SignatureToken,MethodGraph.Node> nodes)
Creates a new simple method graph.- Parameters:
nodes
- The nodes represented by this method graph.
-
-
Method Detail
-
of
public static MethodGraph of(java.util.List<? extends MethodDescription> methodDescriptions)
Returns a method graph that contains all of the provided methods as simple nodes.- Parameters:
methodDescriptions
- A list of method descriptions to be represented as simple nodes.- Returns:
- A method graph that represents all of the provided methods as simple nodes.
-
locate
public MethodGraph.Node locate(MethodDescription.SignatureToken token)
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
public MethodGraph.NodeList listNodes()
Lists all nodes of this method graph.- Specified by:
listNodes
in interfaceMethodGraph
- Returns:
- A list of all nodes of this method graph.
-
-