Package net.bytebuddy.dynamic.scaffold
Enum MethodGraph.Empty
- java.lang.Object
-
- java.lang.Enum<MethodGraph.Empty>
-
- net.bytebuddy.dynamic.scaffold.MethodGraph.Empty
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodGraph.Empty>
,MethodGraph
,MethodGraph.Compiler
,MethodGraph.Linked
- Enclosing interface:
- MethodGraph
public static enum MethodGraph.Empty extends java.lang.Enum<MethodGraph.Empty> implements MethodGraph.Linked, MethodGraph.Compiler
A canonical implementation of an empty 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
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler
MethodGraph.Compiler.AbstractBase, MethodGraph.Compiler.Default<T>, MethodGraph.Compiler.ForDeclaredMethods
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph.Linked
MethodGraph.Linked.Delegation
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Field Summary
-
Fields inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler
DEFAULT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Empty()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodGraph.Linked
compile(TypeDefinition typeDefinition, TypeDescription viewPoint)
Compiles the given type into a method graph.MethodGraph.Linked
compile(TypeDescription typeDescription)
Compiles the given type into a method graph considering the type to be the viewpoint.MethodGraph
getInterfaceGraph(TypeDescription typeDescription)
Returns a graph representing the view on this represented type's directly implemented interface type.MethodGraph
getSuperClassGraph()
Returns a graph representing the view on this represented type's super type.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.Empty
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodGraph.Empty[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MethodGraph.Empty INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodGraph.Empty[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MethodGraph.Empty c : MethodGraph.Empty.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MethodGraph.Empty valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
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.
-
getSuperClassGraph
public MethodGraph 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
public MethodGraph getInterfaceGraph(TypeDescription typeDescription)
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.
-
compile
public MethodGraph.Linked compile(TypeDescription typeDescription)
Compiles the given type into a method graph considering the type to be the viewpoint.- Specified by:
compile
in interfaceMethodGraph.Compiler
- Parameters:
typeDescription
- The type to be compiled.- Returns:
- A linked method graph representing the given type.
-
compile
public MethodGraph.Linked compile(TypeDefinition typeDefinition, TypeDescription viewPoint)
Compiles the given type into a method graph.- Specified by:
compile
in interfaceMethodGraph.Compiler
- Parameters:
typeDefinition
- The type to be compiled.viewPoint
- The view point that determines the method's visibility.- Returns:
- A linked method graph representing the given type.
-
-