Class LifeCycleCallback
- java.lang.Object
-
- org.eclipse.jetty.plus.annotation.LifeCycleCallback
-
- Direct Known Subclasses:
PostConstructCallback,PreDestroyCallback
public abstract class LifeCycleCallback extends java.lang.ObjectLifeCycleCallback 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 voidcallback(java.lang.Object instance)booleanequals(java.lang.Object o)java.lang.reflect.MethodfindMethod(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.StringgetMethodName()java.lang.reflect.MethodgetTarget()java.lang.Class<?>getTargetClass()java.lang.StringgetTargetClassName()inthashCode()abstract voidvalidate(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.SecurityExceptionjava.lang.NoSuchMethodExceptionjava.lang.ClassNotFoundExceptionjava.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionjava.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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
validate
public abstract void validate(java.lang.Class<?> clazz, java.lang.reflect.Method m)
-
-