Package net.bytebuddy.dynamic.scaffold
Enum MethodGraph.Compiler.Default.Merger.Directional
- java.lang.Object
-
- java.lang.Enum<MethodGraph.Compiler.Default.Merger.Directional>
-
- net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Merger.Directional
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodGraph.Compiler.Default.Merger.Directional>
,MethodGraph.Compiler.Default.Merger
- Enclosing interface:
- MethodGraph.Compiler.Default.Merger
public static enum MethodGraph.Compiler.Default.Merger.Directional extends java.lang.Enum<MethodGraph.Compiler.Default.Merger.Directional> implements MethodGraph.Compiler.Default.Merger
A directional merger that always returns either the left or right method description.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Merger
MethodGraph.Compiler.Default.Merger.Directional
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
left
true
if the left method should be returned when merging methods.
-
Constructor Summary
Constructors Modifier Constructor Description private
Directional(boolean left)
Creates a directional merger.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDescription
merge(MethodDescription left, MethodDescription right)
Merges two ambiguously resolved methods to yield a single representative.static MethodGraph.Compiler.Default.Merger.Directional
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodGraph.Compiler.Default.Merger.Directional[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LEFT
public static final MethodGraph.Compiler.Default.Merger.Directional LEFT
A merger that always returns the left method, i.e. the method that was discovered first or was previously merged.
-
RIGHT
public static final MethodGraph.Compiler.Default.Merger.Directional RIGHT
A merger that always returns the right method, i.e. the method that was discovered last.
-
-
Method Detail
-
values
public static MethodGraph.Compiler.Default.Merger.Directional[] 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.Compiler.Default.Merger.Directional c : MethodGraph.Compiler.Default.Merger.Directional.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.Compiler.Default.Merger.Directional 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
-
merge
public MethodDescription merge(MethodDescription left, MethodDescription right)
Merges two ambiguously resolved methods to yield a single representative.- Specified by:
merge
in interfaceMethodGraph.Compiler.Default.Merger
- Parameters:
left
- The left method description, i.e. the method that was discovered first or was previously merged.right
- The right method description, i.e. the method that was discovered last.- Returns:
- A method description compatible to both method's types that is used as a representative.
-
-