All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.appland.appmap.transform.annotations.ArgumentArray Maven / Gradle / Ivy

package com.appland.appmap.transform.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Instructs the hooking mechanism to pass parameters to the hook function as an Object[].
 * For example, suppose there is an instance method public String getGreeting(String name)
 * on MyClass.
 * A hook for this method that does not use ArgumentArray should have the signature
 * public static void myHook(Event e, MyClass receiver, String name). With the ArgumentArray
 * annotation on myHook, the method signature should be
 * public static void myHook(Event e, MyClass receiver, Object[] args).
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface ArgumentArray {
  /**
   * Flags whether or not a given method expects arguments as an array of Objects.
   * @return {@code true} if an array of Objects is expected. Otherwise, {@code false}.
   */
  public boolean value() default true;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy