org.kohsuke.stapler
Class Function

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

public abstract class Function
extends Object

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

Author:
Kohsuke Kawaguchi

Constructor Summary
Function()
           
 
Method Summary
abstract
<A extends Annotation>
A
getAnnotation(Class<A> annotation)
           
abstract  String getDisplayName()
          Gets the human readable name of this function.
abstract  Type[] getGenericParameterTypes()
           
abstract  String getName()
          Gets the method name.
abstract  Annotation[][] getParameterAnnotations()
          Gets the annotations on parameters.
abstract  String[] getParameterNames()
          Gets the list of parameter names.
abstract  Class[] getParameterTypes()
          Gets the type of parameters in a single array.
abstract  String getQualifiedName()
          Gets "className.methodName"
abstract  Class getReturnType()
          Return type of the method.
abstract  Object invoke(StaplerRequest req, StaplerResponse rsp, Object o, Object... args)
          Invokes the method.
static 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 String getName()
Gets the method name.


getDisplayName

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


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.


returnNull

public static Object returnNull()

invoke

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

Throws:
IllegalAccessException
InvocationTargetException

getAnnotation

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


Copyright © 2012. All Rights Reserved.