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:
Serializable
,Comparable<MethodGraph.Compiler.Default.Merger.Directional>
,java.lang.constant.Constable
,MethodGraph.Compiler.Default.Merger
- Enclosing interface:
MethodGraph.Compiler.Default.Merger
public static enum MethodGraph.Compiler.Default.Merger.Directional
extends 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 class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler.Default.Merger
MethodGraph.Compiler.Default.Merger.Directional
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
true
if the left method should be returned when merging methods. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmerge
(MethodDescription left, MethodDescription right) Merges two ambiguously resolved methods to yield a single representative.Returns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LEFT
A merger that always returns the left method, i.e. the method that was discovered first or was previously merged. -
RIGHT
A merger that always returns the right method, i.e. the method that was discovered last.
-
-
Field Details
-
left
private final boolean lefttrue
if the left method should be returned when merging methods.
-
-
Constructor Details
-
Directional
private Directional(boolean left) Creates a directional merger.- Parameters:
left
-true
if the left method should be returned when merging methods.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
merge
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.
-