org.kohsuke.stapler
Class Function

java.lang.Object
  extended by org.kohsuke.stapler.Function

public abstract class Function
extends java.lang.Object

Abstracts the difference between normal instance methods and static duck-typed methods.

Author:
Kohsuke Kawaguchi

Constructor Summary
Function()
           
 
Method Summary
abstract
<A extends java.lang.annotation.Annotation>
A
getAnnotation(java.lang.Class<A> annotation)
           
abstract  java.lang.String getDisplayName()
          Gets the human readable name of this function.
abstract  java.lang.reflect.Type[] getGenericParameterTypes()
           
abstract  java.lang.String getName()
          Gets the method name.
abstract  java.lang.annotation.Annotation[][] getParameterAnnotations()
          Gets the annotations on parameters.
abstract  java.lang.String[] getParameterNames()
          Gets the list of parameter names.
abstract  java.lang.Class[] getParameterTypes()
          Gets the type of parameters in a single array.
abstract  java.lang.String getQualifiedName()
          Gets "className.methodName"
abstract  java.lang.Class getReturnType()
          Return type of the method.
abstract  java.lang.Object invoke(StaplerRequest req, StaplerResponse rsp, java.lang.Object o, java.lang.Object... args)
          Invokes the method.
static java.lang.Object returnNull()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Function

public Function()
Method Detail

getName

public abstract java.lang.String getName()
Gets the method name.


getDisplayName

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


getQualifiedName

public abstract java.lang.String getQualifiedName()
Gets "className.methodName"


getParameterTypes

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


getGenericParameterTypes

public abstract java.lang.reflect.Type[] getGenericParameterTypes()

getParameterAnnotations

public abstract java.lang.annotation.Annotation[][] getParameterAnnotations()
Gets the annotations on parameters.


getParameterNames

public abstract java.lang.String[] getParameterNames()
Gets the list of parameter names.


getReturnType

public abstract java.lang.Class getReturnType()
Return type of the method.


returnNull

public static java.lang.Object returnNull()

invoke

public abstract java.lang.Object invoke(StaplerRequest req,
                                        StaplerResponse rsp,
                                        java.lang.Object o,
                                        java.lang.Object... args)
                                 throws java.lang.IllegalAccessException,
                                        java.lang.reflect.InvocationTargetException
Invokes the method.

Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getAnnotation

public abstract <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotation)


Copyright © 2012. All Rights Reserved.