Class LifeCycleCallback
- java.lang.Object
-
- org.eclipse.jetty.plus.annotation.LifeCycleCallback
-
- Direct Known Subclasses:
PostConstructCallback
,PreDestroyCallback
public abstract class LifeCycleCallback extends java.lang.Object
LifeCycleCallback Holds information about a class and method that has either been configured in web.xml to have postconstruct or predestroy callbacks, or has the equivalent annotations.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object[]
__EMPTY_ARGS
-
Constructor Summary
Constructors Constructor Description LifeCycleCallback(java.lang.Class<?> clazz, java.lang.String methodName)
LifeCycleCallback(java.lang.String className, java.lang.String methodName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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()
int
hashCode()
abstract void
validate(java.lang.Class<?> clazz, java.lang.reflect.Method m)
-
-
-
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
-
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 inspectionclazz
- the class under inspectionmethodName
- the method to findcheckInheritance
- false on first entry, true if a superclass is being introspected- Returns:
- the method
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
validate
public abstract void validate(java.lang.Class<?> clazz, java.lang.reflect.Method m)
-
-