org.eclipse.jetty.plus.annotation
Class LifeCycleCallback

java.lang.Object
  extended by org.eclipse.jetty.plus.annotation.LifeCycleCallback
Direct Known Subclasses:
PostConstructCallback, PreDestroyCallback

public abstract class LifeCycleCallback
extends Object

LifeCycleCallback


Field Summary
static Object[] __EMPTY_ARGS
           
 
Constructor Summary
LifeCycleCallback()
           
 
Method Summary
 void callback(Object instance)
           
 boolean equals(Object o)
           
 Method findMethod(Package pack, Class clazz, String methodName, boolean checkInheritance)
          Find a method of the given name either directly in the given class, or inherited.
 String getMethodName()
           
 Method getTarget()
           
 Class getTargetClass()
           
 String getTargetClassName()
           
 void setTarget(Class clazz, String methodName)
           
 void setTarget(String className, String methodName)
           
abstract  void validate(Class clazz, Method m)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__EMPTY_ARGS

public static final Object[] __EMPTY_ARGS
Constructor Detail

LifeCycleCallback

public LifeCycleCallback()
Method Detail

getTargetClass

public Class getTargetClass()
Returns:
the _targetClass

getTargetClassName

public String getTargetClassName()

getMethodName

public String getMethodName()

getTarget

public Method getTarget()
Returns:
the target

setTarget

public void setTarget(String className,
                      String methodName)

setTarget

public void setTarget(Class clazz,
                      String methodName)

callback

public void callback(Object instance)
              throws SecurityException,
                     NoSuchMethodException,
                     ClassNotFoundException,
                     IllegalArgumentException,
                     IllegalAccessException,
                     InvocationTargetException
Throws:
SecurityException
NoSuchMethodException
ClassNotFoundException
IllegalArgumentException
IllegalAccessException
InvocationTargetException

findMethod

public Method findMethod(Package pack,
                         Class clazz,
                         String methodName,
                         boolean checkInheritance)
Find a method of the given name either directly in the given class, or inherited.

Parameters:
pack - the package of the class under inspection
clazz - the class under inspection
methodName - the method to find
checkInheritance - false on first entry, true if a superclass is being introspected
Returns:
the method

equals

public boolean equals(Object o)
Overrides:
equals in class Object

validate

public abstract void validate(Class clazz,
                              Method m)


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.