Class Function

Direct Known Subclasses:
ForwardingFunction, Function.InstanceFunction

public abstract class Function extends Object
Abstracts the difference between normal instance methods and static duck-typed methods.
Kohsuke Kawaguchi
  • Constructor Details

    • Function

      public Function()
  • Method Details

    • getName

      public abstract String getName()
      Gets the method name.
    • getDisplayName

      public abstract String getDisplayName()
      Gets the human readable name of this function. Used to assist debugging.
    • getSignature

      public abstract String getSignature()
      Gets the signature for this for use in lists
    • getQualifiedName

      public abstract String getQualifiedName()
      Gets "className.methodName"
    • getParameterTypes

      public abstract Class[] getParameterTypes()
      Gets the type of parameters in a single array.
    • getGenericParameterTypes

      public abstract Type[] getGenericParameterTypes()
    • getParameterAnnotations

      public abstract Annotation[][] getParameterAnnotations()
      Gets the annotations on parameters.
    • getParameterNames

      public abstract String[] getParameterNames()
      Gets the list of parameter names.
    • getReturnType

      public abstract Class getReturnType()
      Return type of the method.
    • getCheckedExceptionTypes

      public abstract Class[] getCheckedExceptionTypes()
      Gets the type of checked exceptions.

      Take care that RuntimeException can be checked but it's not mandatory

    • getDeclaringClass

      public abstract Class getDeclaringClass()
      Returns the Class object representing the class or interface that declares the executable represented by this object.
      See Also:
    • isStatic

      public abstract boolean isStatic()
      Returns true if and only if the function is static.
    • contextualize

      public Function contextualize(Object usage)
      Caller uses this method to tell Function about how it is being used. By default, this methods ignores the given context by returning this.
    • returnNull

      public static Object returnNull()
      See Also:
    • invoke

      public abstract Object invoke(StaplerRequest req, StaplerResponse rsp, Object o, Object... args) throws IllegalAccessException, InvocationTargetException, javax.servlet.ServletException
      Invokes the method.
    • getAnnotation

      public abstract <A extends Annotation> A getAnnotation(Class<A> annotation)
    • getAnnotations

      public abstract Annotation[] getAnnotations()