Class AgentBuilder.Default.NativeMethodStrategy.ForPrefix

    • Field Detail

      • prefix

        private final java.lang.String prefix
        The method name prefix.
    • Constructor Detail

      • ForPrefix

        protected ForPrefix​(java.lang.String prefix)
        Creates a new name prefixing native method strategy.
        Parameters:
        prefix - The method name prefix.
    • Method Detail

      • of

        protected static AgentBuilder.Default.NativeMethodStrategy of​(java.lang.String prefix)
        Creates a new native method strategy for prefixing method names.
        Parameters:
        prefix - The method name prefix.
        Returns:
        An appropriate native method strategy.
      • isEnabled

        public boolean isEnabled​(java.lang.instrument.Instrumentation instrumentation)
        Determines if this strategy enables name prefixing for native methods.
        Specified by:
        isEnabled in interface AgentBuilder.Default.NativeMethodStrategy
        Parameters:
        instrumentation - The instrumentation used.
        Returns:
        true if this strategy indicates that a native method prefix should be used.
      • getPrefix

        public java.lang.String getPrefix()
        Returns the method prefix if the strategy is enabled. This method must only be called if this strategy enables prefixing.
        Specified by:
        getPrefix in interface AgentBuilder.Default.NativeMethodStrategy
        Returns:
        The method prefix.