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 java.lang.Object

LifeCycleCallback


Field Summary
static java.lang.Object[] __EMPTY_ARGS
           
 
Constructor Summary
LifeCycleCallback()
           
 
Method Summary
 void callback(java.lang.Object instance)
           
 boolean equals(java.lang.Object o)
           
 java.lang.reflect.Method findMethod(java.lang.Package pack, java.lang.Class clazz, java.lang.String methodName, boolean checkInheritance)
          Find a method of the given name either directly in the given class, or inherited.
 java.lang.String getMethodName()
           
 java.lang.reflect.Method getTarget()
           
 java.lang.Class getTargetClass()
           
 java.lang.String getTargetClassName()
           
 void setTarget(java.lang.Class clazz, java.lang.String methodName)
           
 void setTarget(java.lang.String className, java.lang.String methodName)
           
abstract  void validate(java.lang.Class clazz, java.lang.reflect.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 java.lang.Object[] __EMPTY_ARGS
Constructor Detail

LifeCycleCallback

public LifeCycleCallback()
Method Detail

getTargetClass

public java.lang.Class getTargetClass()
Returns:
the _targetClass

getTargetClassName

public java.lang.String getTargetClassName()

getMethodName

public java.lang.String getMethodName()

getTarget

public java.lang.reflect.Method getTarget()
Returns:
the target

setTarget

public void setTarget(java.lang.String className,
                      java.lang.String methodName)

setTarget

public void setTarget(java.lang.Class clazz,
                      java.lang.String methodName)

callback

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

findMethod

public java.lang.reflect.Method findMethod(java.lang.Package pack,
                                           java.lang.Class clazz,
                                           java.lang.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(java.lang.Object o)
Overrides:
equals in class java.lang.Object

validate

public abstract void validate(java.lang.Class clazz,
                              java.lang.reflect.Method m)


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