You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by sc...@apache.org on 2019/04/26 17:58:07 UTC

[tomcat] branch master updated: Add javadoc to describe this method.

This is an automated email from the ASF dual-hosted git repository.

schultz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 62e0fca  Add javadoc to describe this method.
     new c84623e  Merge pull request #160 from ChristopherSchultz/master
62e0fca is described below

commit 62e0fcafa800f0ac1dee514a65f4adb596d45d7d
Author: Christopher Schultz <ch...@christopherschultz.net>
AuthorDate: Wed Apr 24 12:45:04 2019 -0400

    Add javadoc to describe this method.
---
 java/org/apache/tomcat/util/IntrospectionUtils.java | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java b/java/org/apache/tomcat/util/IntrospectionUtils.java
index bb954fb..3ffa702 100644
--- a/java/org/apache/tomcat/util/IntrospectionUtils.java
+++ b/java/org/apache/tomcat/util/IntrospectionUtils.java
@@ -434,6 +434,23 @@ public final class IntrospectionUtils {
     }
 
 
+    /**
+     * Checks to see if the specified class is an instance of or assignable from
+     * the specified type. The class <code>clazz</code>, all its superclasses,
+     * interfaces and those superinterfaces are tested for a match against
+     * the type name <code>type</code>.
+     *
+     * This is similar to <code>instanceof</code> or {@link Class#isAssignableFrom}
+     * except that the target type will not be resolved into a Class
+     * object, which provides some security and memory benefits.
+     *
+     * @param clazz The class to test for a match.
+     * @param type The name of the type that <code>clazz</code> must be.
+     *
+     * @return <code>true</code> if the <code>clazz</code> tested is an
+     *         instance of the specified <code>type</code>,
+     *         <code>false</code> otherwise.
+     */
     public static boolean isInstance(Class<?> clazz, String type) {
         if (type.equals(clazz.getName())) {
             return true;


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org