Package net.bytebuddy.implementation
Enum Implementation.Target.AbstractBase.DefaultMethodInvocation
- java.lang.Object
-
- java.lang.Enum<Implementation.Target.AbstractBase.DefaultMethodInvocation>
-
- net.bytebuddy.implementation.Implementation.Target.AbstractBase.DefaultMethodInvocation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Implementation.Target.AbstractBase.DefaultMethodInvocation>
- Enclosing class:
- Implementation.Target.AbstractBase
protected static enum Implementation.Target.AbstractBase.DefaultMethodInvocation extends java.lang.Enum<Implementation.Target.AbstractBase.DefaultMethodInvocation>
Determines if default method invocations are possible.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DefaultMethodInvocation()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Implementation.SpecialMethodInvocation
apply(MethodGraph.Node node, TypeDescription targetType)
Resolves a default method invocation for a given node.static Implementation.Target.AbstractBase.DefaultMethodInvocation
of(ClassFileVersion classFileVersion)
Resolves a default method invocation depending on the class file version permitting such calls.static Implementation.Target.AbstractBase.DefaultMethodInvocation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Implementation.Target.AbstractBase.DefaultMethodInvocation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENABLED
public static final Implementation.Target.AbstractBase.DefaultMethodInvocation ENABLED
Permits default method invocations, if an interface declaring a default method is possible.
-
DISABLED
public static final Implementation.Target.AbstractBase.DefaultMethodInvocation DISABLED
Does not permit default method invocations.
-
-
Method Detail
-
values
public static Implementation.Target.AbstractBase.DefaultMethodInvocation[] 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 (Implementation.Target.AbstractBase.DefaultMethodInvocation c : Implementation.Target.AbstractBase.DefaultMethodInvocation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Implementation.Target.AbstractBase.DefaultMethodInvocation 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
-
of
public static Implementation.Target.AbstractBase.DefaultMethodInvocation of(ClassFileVersion classFileVersion)
Resolves a default method invocation depending on the class file version permitting such calls.- Parameters:
classFileVersion
- The class file version to resolve for.- Returns:
- A suitable default method invocation mode.
-
apply
protected abstract Implementation.SpecialMethodInvocation apply(MethodGraph.Node node, TypeDescription targetType)
Resolves a default method invocation for a given node.- Parameters:
node
- The node representing the default method call.targetType
- The target type defining the default method.- Returns:
- A suitable special method invocation.
-
-