Class Introspection
java.lang.Object
org.apache.catalina.util.Introspection
Provides introspection utilities that either require knowledge of Tomcat internals or are solely used by Tomcat
internals.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> convertPrimitiveType(Class<?> clazz) Converts the primitive type to its corresponding wrapper.static StringgetPropertyName(Method setter) Extract the Java Bean property name from the setter name.static booleanisValidLifecycleCallback(Method method) Determines if a method is a valid lifecycle callback method.static booleanisValidSetter(Method method) Determines if a method has a valid name and signature for a Java Bean setter.static Class<?> Attempt to load a class using the given Container's class loader.
-
Constructor Details
-
Introspection
public Introspection()
-
-
Method Details
-
getPropertyName
-
isValidSetter
Determines if a method has a valid name and signature for a Java Bean setter.- Parameters:
method- The method to test- Returns:
trueif the method does have a valid name and signature, elsefalse
-
isValidLifecycleCallback
Determines if a method is a valid lifecycle callback method.- Parameters:
method- The method to test- Returns:
trueif the method is a valid lifecycle callback method, elsefalse
-
loadClass
Attempt to load a class using the given Container's class loader. If the class cannot be loaded, a debug level log message will be written to the Container's log and null will be returned.- Parameters:
context- The class loader of this context will be used to attempt to load the classclassName- The class name- Returns:
- the loaded class or
nullif loading failed
-
convertPrimitiveType
-