Interface VisibilityBridgeStrategy

All Known Implementing Classes:
VisibilityBridgeStrategy.Default

public interface VisibilityBridgeStrategy
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 Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Default implementations of visibility bridge strategies.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines if a visibility bridge should be generated for a method that is eligable.
  • Method Details

    • generateVisibilityBridge

      boolean generateVisibilityBridge(MethodDescription methodDescription)
      Determines if a visibility bridge should be generated for a method that is eligable.
      Parameters:
      methodDescription - The method that would require a visibility bridge.
      Returns:
      true if a visibility bridge should be generated.