Top Description Inners Methods
net.bytebuddy.dynamic

public Interface VisibilityBridgeStrategy

Known Direct Implementers
net.bytebuddy.dynamic.VisibilityBridgeStrategy.Default
Imports
net.bytebuddy.description.method.MethodDescription

Implements a strategy for deciding if a visibility bridge should be generated. A visibility bridge is necessary if a public type inherits a public method from a package-private type to allow for invoking that method without specific privileges as the reflection API only considers the method's declaring type.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
VisibilityBridgeStrategy.Default

Default implementations of visibility bridge strategies.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if a visibility bridge should be generated.
generateVisibilityBridge
(MethodDescription
The method that would require a visibility bridge.
methodDescription
)

Determines if a visibility bridge should be generated for a method that is eligable.

Method Detail

generateVisibilityBridgeback to summary
public boolean generateVisibilityBridge(MethodDescription methodDescription)

Determines if a visibility bridge should be generated for a method that is eligable.

Parameters
methodDescription:MethodDescription

The method that would require a visibility bridge.

Returns:boolean

true if a visibility bridge should be generated.

net.bytebuddy.dynamic back to summary

public sealed Enum VisibilityBridgeStrategy.Default

extends Enum<VisibilityBridgeStrategy.Default>
implements VisibilityBridgeStrategy
Class Inheritance
All Implemented Interfaces
net.bytebuddy.dynamic.VisibilityBridgeStrategy

Default implementations of visibility bridge strategies.

Field Summary

Modifier and TypeField and Description
public static final VisibilityBridgeStrategy.Default
ALWAYS

Always generates a visibility bridge.

public static final VisibilityBridgeStrategy.Default
NEVER

Never generates a visibility bridge.

public static final VisibilityBridgeStrategy.Default
ON_NON_GENERIC_METHOD

Only generates visibility bridges for non-generified methods what was the behavior of javac until Java 11.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static VisibilityBridgeStrategy.Default
public static VisibilityBridgeStrategy.Default[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALWAYSback to summary
public static final VisibilityBridgeStrategy.Default ALWAYS

Always generates a visibility bridge.

NEVERback to summary
public static final VisibilityBridgeStrategy.Default NEVER

Never generates a visibility bridge.

ON_NON_GENERIC_METHODback to summary
public static final VisibilityBridgeStrategy.Default ON_NON_GENERIC_METHOD

Only generates visibility bridges for non-generified methods what was the behavior of javac until Java 11.

Constructor Detail

Defaultback to summary
private Default()

Method Detail

valueOfback to summary
public static VisibilityBridgeStrategy.Default valueOf(String name)
valuesback to summary
public static VisibilityBridgeStrategy.Default[] values()