Java Class.findClass Examples

Java Class.findClass - 2 examples found. These are the top rated real world Java examples of Class.findClass extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 /**
  * Recursively finds a class matching the given URI.
  *
  * @param uri
  */
 public Class findClass(URI uri) {
   if (this.uri.equals(uri)) {
     return this;
   } else {
     for (Class c : this.children) {
       Class found = c.findClass(uri);
       if (found != null) {
         return found;
       }
     }
   }
   return null;
 }
Example #2
0
 /**
  * Recursively finds a class matching the given ID.
  *
  * @param id
  */
 public Class findClass(String id) {
   if (this.id.equals(id)) {
     return this;
   } else {
     for (Class c : this.children) {
       Class found = c.findClass(id);
       if (found != null) {
         return found;
       }
     }
   }
   return null;
 }